-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[CI] Check contributor user ID #6578
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
Conversation
d2d5435
to
57bfe5b
Compare
The job is failed with an obscure message about short-circuiting, brief search showing that it might be some sort of Pipelines glitch. |
5baad76
to
339f17e
Compare
Alright, this approach (trying to get user ID of the submitter) might not work - it does not get the user name in |
Also, it looks like a variation of the tool we are using might be able to check for signatures in the file as well as agreement in the repo: https://github.com/cla-assistant/github-action |
@rhuanjl @Fly-Style what do you think about continuing on this path vs the |
My preference is this approach if we can do it - if the github actions API lets us grab commit user names could we do it with a minimal script like this PR but github actions instead of Azure? |
I don't really see anything that would easily provide the username, the best bet is using the API, which is done in full version of CLA check. Test repo using this approach: https://github.com/ppenzin/cla-sign-check We can customize what the bot says, how things are called and where they are stored. |
@rhuanjl you can open a PR in the test repo to see how bot would interact with you: https://github.com/ppenzin/cla-sign-check End result of my interaction with it: ppenzin/cla-sign-check#2 The only downside is that it edits its own message instead of adding a new one when the agreement is signed, but maybe there is a way to change that. Signatures are stored in |
18cfff1
to
8ec6142
Compare
@rhuanjl turns out Actions support querying usernames. This should work, though I am not sure if this PR is going to get checked by it. I did prepare the other variant as well. POC is in https://github.com/ppenzin/cla-grep-check (note you are already in the file, as I just copied it from here). |
This is really nice - I like how totally lightweight it is. Not as many features as some of the other options but does what it needs. (One thing I'd perhaps change is deleting the space out of the name "Contribution Agreement.md" I know I put it there in the first place but it causes problems with the style check scripts and it's currently the only file in our source tree with a space in the name (I think). We'd have to change it in a couple of other places too Readme.md and Contributing.md both ref it.) |
Looks good to me. Probably, I'd disable cla-assistant. |
Obviously we've got options here and need to pick one - I think we've looked at 3:
Any of the 3 work: My preference is (1) but I could see us using any of them so - which one is your favourite @ppenzin @Fly-Style ? |
Check if a user ID of the submitter is in the Contributor Agreement file.
8ec6142
to
2f23b14
Compare
Squashed two commits together (nobody really needs to see broken Pipelines solution) and dropped space from the agreement file. We can also wire the rest of CI to fire only after CLA check, to skip building PRs we can't merge for CLA reasons. |
@Fly-Style please do drop cla-assistant, thanks for looking into it as an option though. |
Check if a user ID of the submitter is in the Contributor Agreement file.