-
Notifications
You must be signed in to change notification settings - Fork 220
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
Release Drafter: Automatically replace GitHub handles with names and links #2777
Conversation
.github/release-drafter.yml
Outdated
@@ -27,6 +27,19 @@ exclude-contributors: | |||
category-template: '### $TITLE' | |||
change-template: '* $TITLE ([#$NUMBER]($URL))' | |||
sort-by: 'title' | |||
replacers: | |||
- search: '/@(\w+)(,\s| and )?/g' | |||
replace: '- [@$1](https://github.com/$1)\\n' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably more for my understanding: Why are there now two backslashes (\\
) before the n
? In comment #2775 (comment) it was only one backslash (\
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I first tried \n
, then found it didn't work, then tried \\n
, still no luck.
The above regex produces the following output: It's likely because Markdown doesn't support In commit 4f8236a, I've changed the regex to
It looks good to me. When making a new release, we just need to convert it to a bulleted list and sort the names based on number of commits. |
Co-authored-by: Yvonne Fröhlich <[email protected]>
Co-authored-by: Yvonne Fröhlich <[email protected]>
- search: '@maxrjones' | ||
replace: 'Max Jones' | ||
- search: '@michaelgrund' | ||
replace: 'Michael Grund' | ||
- search: '@seisman' | ||
replace: 'Dongdong Tian' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sort this part alphabetically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're already sorted alphabetically by GitHub handles, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, was looking at full names, nvm.
Description of proposed changes
Closes #2775.
The
replacers
almost works, but it has some trouble with newlines\n
.In my own fork, the draft release (https://github.com/seisman/pygmt/releases, but it's likely you can't see a draft release) looks like this: