Skip to content

Release Drafter: Automatically replace GitHub handles with names and links#2777

Merged
seisman merged 10 commits intoGenericMappingTools:mainfrom
seisman:main
Oct 31, 2023
Merged

Release Drafter: Automatically replace GitHub handles with names and links#2777
seisman merged 10 commits intoGenericMappingTools:mainfrom
seisman:main

Conversation

@seisman
Copy link
Member

@seisman seisman commented Oct 30, 2023

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:
image

@seisman seisman added the maintenance Boring but important stuff for the core devs label Oct 30, 2023
@seisman seisman added this to the 0.11.0 milestone Oct 30, 2023
sort-by: 'title'
replacers:
- search: '/@(\w+)(,\s| and )?/g'
replace: '- [@$1](https://github.com/$1)\\n'
Copy link
Member

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 (\).

Copy link
Member Author

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.

@seisman
Copy link
Member Author

seisman commented Oct 31, 2023

  - search: '/@(\w+)(,\s| and )?/g'
    replace: '- [@$1](https://github.com/$1)\n'

The above regex produces the following output:

image

It's likely because Markdown doesn't support \n. There may be some workarounds but I don't think it is worth my time.

In commit 4f8236a, I've changed the regex to

  - search: '/@(\w+)?/g'
    replace: '[@$1](https://github.com/$1)'

The new regex produces:
image

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.

@seisman seisman marked this pull request as ready for review October 31, 2023 06:40
@seisman seisman added the needs review This PR has higher priority and needs review. label Oct 31, 2023
@michaelgrund michaelgrund added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Oct 31, 2023
seisman and others added 2 commits October 31, 2023 17:20
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Comment on lines +33 to +38
- search: '@maxrjones'
replace: 'Max Jones'
- search: '@michaelgrund'
replace: 'Michael Grund'
- search: '@seisman'
replace: 'Dongdong Tian'
Copy link
Member

Choose a reason for hiding this comment

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

Sort this part alphabetically?

Copy link
Member Author

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?

Copy link
Member

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.

@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Oct 31, 2023
@seisman seisman merged commit dfe2554 into GenericMappingTools:main Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release Drafter: Automatically replace GitHub handles with real names and links

4 participants