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

Recognize co-authored-by in commit messages #85

Open
asmeurer opened this issue Apr 21, 2020 · 4 comments
Open

Recognize co-authored-by in commit messages #85

asmeurer opened this issue Apr 21, 2020 · 4 comments

Comments

@asmeurer
Copy link
Member

See for example sympy/sympy#19158

@iammosespaulr
Copy link

async for commit in commits:
if commit['author']:
users.add(commit['author']['login'])
message = commit['commit']['message']
if BEGIN_RELEASE_NOTES in message or END_RELEASE_NOTES in message:
header_in_message = commit['sha']
users.add(event.data['pull_request']['head']['user']['login'])
users = sorted(users)

Searching message in

message = commit['commit']['message']
for Co-authored-by: author-name <[email protected]> using regex and adding them to users might work ?

@asmeurer
Copy link
Member Author

It would be better if there were direct support for it in the GitHub API. The reason is that we need a GitHub username for the release notes.

@iammosespaulr
Copy link

It would be better if there were direct support for it in the GitHub API. The reason is that we need a GitHub username for the release notes.

Yeah it would! I can't seem to find support for it in the Official API's.
However,
https://api.github.com/search/[email protected] does provide the username.

@asmeurer
Copy link
Member Author

So we can query the email. If we don't get a username from it, we can just include the name and email directly (it doesn't have to be a username, that's just the format we use).

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

No branches or pull requests

2 participants