-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update the changelog script to include author in the oneliner #2323
Comments
Hey @tsandall, I'd like to give this a shot, so can I try this if this is still open? This would aim at adding the author to the changelog so that it looks something like Also, I tried running the script but I'm getting the error
while running the script, the fix for which would be to use Update:
And if we want the GitHub id of the user, one way would be to use the GitHub search API using:
|
Thanks for looking into this one @Syn3rman !! Looks like you're already making some good progress on it 👍 I do think that we would probably want to try and lookup their GitHub id, ideally once we have the commit SHA ID we should be able to lookup the metadata about it via https://developer.github.com/v3/repos/commits/#get-a-single-commit the snippet using requests is probably pretty close to what we'd want to use. |
Getting the login name from the API that @patrick-east showed would be ideal because they contributors will get tagged and anyone looking at the release notes will be able to easily navigate to their profile. If the script could exclude OPA maintainers that would be best. I'm not sure the best way to achieve that. If it's possible to lookup the organizations that a GitHub user is apart of that would help. I think my own organization memberships are public. |
May not be too hard to just check against https://github.com/open-policy-agent/opa/blob/master/MAINTAINERS.md too |
Thanks for the reply @tsandall @patrick-east!
That seemed to work for me till I ran into a 403 error, since it looks like you can only make 60 requests while you are not authenticated.
I thought of first checking if the author is a maintainer or not by using the regex pattern I have implemented this, so I'll open a pr so that you can have a look at it and suggest changes. |
OPA uses the changelog file to recognize people who contribute to the project by mentioning them in it. This commit introduces a way to fetch the GitHub handle for the commit authors if they are not listed in the MAINTAINERS.md file. It makes use of the GitHub API to do so, and thus introduces an optional cli argument to pass the token to authenticate requests, without which you might run into rate limit errors if you run the script a couple of times. Fixes #2323 Signed-off-by: Aditya <aditya10699@gmail.com>
We like to recognize people for contributing to OPA by including a mention of them in the CHANGELOG. Today is this is somewhat ad-hoc and requires manual edits to the generated CHANGELOG updates. It would be better if the changelog script (build/changelog.py) was smart enough to figure out the GitHub name of the person.
The text was updated successfully, but these errors were encountered: