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

Add CLA Verification Worflow #169

Merged
merged 2 commits into from
Apr 27, 2022
Merged

Add CLA Verification Worflow #169

merged 2 commits into from
Apr 27, 2022

Conversation

nlordell
Copy link
Contributor

@nlordell nlordell commented Apr 26, 2022

This PR adds a workflow for verifying CLA signatures for external contributors.

I detailed the steps for integrating here for other projects to use.

Basically, this workflow will first:

  • Fetch the collaborators (AFAICT team members that we have added to the repo) with the GitHub API.
  • Add them and *[bot] to the list of "allowed" GitHub users that don't need to sign the CLA.
  • Use the contributor-assistant/github-action action to verify the CLA is signed. I used this action as it seemed to be, by far, the most popular one in the market place and keeps the signature file in-tree.

Test Plan

Checkout the CLA file that was created. It turns out that the pull_request_target triggers, the GitHub action needs to be in main, so the bot will be enabled after this is already merged. I tested it in a repo before creating this PR here: https://github.com/cowprotocol/cla-test.

Also, if someone has a non-member account after this is merged (maybe @e00E), can they create a PR and check that the CLA bot flags it as CLA needed?

@nlordell
Copy link
Contributor Author

recheck

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2022

Codecov Report

Merging #169 (1ac2569) into main (f203851) will increase coverage by 0.02%.
The diff coverage is n/a.

❗ Current head 1ac2569 differs from pull request most recent head 67cccb2. Consider uploading reports for the commit 67cccb2 to get more accurate results

@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   64.80%   64.83%   +0.02%     
==========================================
  Files         185      185              
  Lines       38398    38388      -10     
==========================================
+ Hits        24884    24889       +5     
+ Misses      13514    13499      -15     

@josojo
Copy link
Contributor

josojo commented Apr 26, 2022

Thanks Nick. Pr looks good.

Just FYI: I thought I would have merged the external contribution from here: #162
but actually, it was not yet merged. That means we don't need a custom text for them to sign. All good.

Copy link
Contributor

@MartinquaXD MartinquaXD left a comment

Choose a reason for hiding this comment

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

Thanks for setting this up!
LGTM.
I'm a little confused about the purpose of recheck if the bot also gets triggered when someone comments the magic words.
When would somebody use recheck?

@nlordell
Copy link
Contributor Author

When would somebody use recheck?

Good question. This is mostly an artifact from copying the setup from https://github.com/contributor-assistant/github-action, but one case where it would be useful is if you have someone make a PR, then added to the team (making them exempt from CLA signing), then recheck would re-run the check making them not need to sign the CLA (at least in principle).

@nlordell nlordell enabled auto-merge (squash) April 27, 2022 12:11
@nlordell nlordell merged commit 74468af into main Apr 27, 2022
@nlordell nlordell deleted the add-cla-bot branch April 27, 2022 12:14
@github-actions github-actions bot locked and limited conversation to collaborators Apr 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants