Skip to content

Conversation

@james-bruten-mo
Copy link
Contributor

In the CLA action the merge ref of a PR is currently compared against the Base SHA to see if the CONTRIBUTORS file has been modified in that branch.

  • The merge ref represents the latest version of the target branch merged with the PR branch (and only exists if there are no conflicts).
  • The Base SHA represents the latest commit shared between the target and PR branch (either the point the PR branch was created or the last time the PR branch was updated)

This is incorrect as the merge ref may well contain additional commits since the Base SHA, some of which might change the CONTRIBUTORS, resulting in incorrect failures. Instead, use the Base Ref value, which returns the name of the target branch, and therefore we'll be comparing against the latest commit.

Copy link
Contributor

@jennyhickson jennyhickson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Confirmed offline that GITHUB_BASE_REF returns the expected values.

@jennyhickson jennyhickson merged commit ff044f9 into MetOffice:main Jan 26, 2026
2 checks passed
@jennyhickson jennyhickson added this to the Spring 2026 milestone Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants