Set the SHA256 header as the default and falling back to the SHA1 header when the SHA256 header is empty. The GitHub documentation recommends using the SHA256 header so I don't expect the fallback to be needed in a live environment. Still, this fallback prevents introducing breaking changes when used in tests.
tests
Updated unit tests
Ran atlantis new docker image and validated against github events
what
Add support for the X-Hub-Signature-256 header
why
Set the SHA256 header as the default and falling back to the SHA1 header when the SHA256 header is empty. The GitHub documentation recommends using the SHA256 header so I don't expect the fallback to be needed in a live environment. Still, this fallback prevents introducing breaking changes when used in tests.
tests
references
This solution is based on this PR from @reinoudk