Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure CLA check gets skipped for Argo #520

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

danielpgross
Copy link
Collaborator

@danielpgross danielpgross commented Jan 7, 2025

The automatic CLA check isn't working as desired in some cases -- the check is being enforced even though Argo is the PR author. This is happening because the check currently checks if github.actor matches the Argo bot username, but github.actor is actually the user who last caused CI to be triggered, whether by commenting on the PR, pushing changes, etc.

Here's a good example showing the check being enforced for an Argo PR because the triggering user was someone else.

The fix here is to directly check the PR author, instead of the event actor. This is done slightly differently depending on the event type:

  • For a pull_request_target event: github.event.pull_request.user.login
  • For an issue_comment event: github.event.issue.user.login

https://github.com/orgs/community/discussions/25502 provides more context.

Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@danielpgross danielpgross marked this pull request as ready for review January 7, 2025 19:18
Copy link
Collaborator

@elsom25 elsom25 left a comment

Choose a reason for hiding this comment

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

The joys of github workflows. Thanks for figuring this one out

@danielpgross danielpgross force-pushed the 01-07-ensure_cla_check_gets_skipped_for_argo branch from 7571b76 to 3808114 Compare January 7, 2025 20:17
@danielpgross danielpgross merged commit 81cae7c into main Jan 7, 2025
5 checks passed
Copy link
Collaborator Author

Merge activity

  • Jan 7, 3:23 PM EST: A user merged this pull request with Graphite.

@danielpgross danielpgross deleted the 01-07-ensure_cla_check_gets_skipped_for_argo branch January 7, 2025 20:23
danielpgross added a commit that referenced this pull request Jan 8, 2025
Follow up to #520, which added comments to the definition that seem to be breaking the action altogether (example: https://github.com/Shopify/product-taxonomy/actions/runs/12668524840)

This removes those comments altogether.
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