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

Pull request author placeholder #84

Merged
merged 6 commits into from
Jul 4, 2021
Merged

Pull request author placeholder #84

merged 6 commits into from
Jul 4, 2021

Conversation

korthout
Copy link
Owner

@korthout korthout commented Jul 4, 2021

Adds a new placeholder ${pull_author} to be used in custom pull descriptions introduced in #64.

This placeholder will be replaced with the username of the original pull request's author (i.e. the user that created the pull request that is backported).

The placeholder can be used to mention the author, by prefixing the placeholder with the @ character. This will subscribe the mentioned user to notification of the new backport pull request. For example: Original pull request by @${pull_author} would result in Original pull request by @korthout if I was the author.

closes #75

Successfully tested with https://github.com/zeebe-io/automation-lab/pull/70

This makes it easier to test the placeholder replacements
Adds tests for templates containing none or any of the available
placeholders and verifies that they are correctly used to replace values
in the way it works currently.

Note, that currently it fails to replace multiple of the same
placeholders.
A pull author refers to the username, not the handle of the author. So
it does not contain the `@` character. We can always add this later. For
reference, that could like this:

```
`pull_author_handle` | The handle of the original pull request's author,
e.g. `@korthout`
```
@korthout korthout merged commit 4c106a2 into master Jul 4, 2021
@korthout korthout deleted the author-placeholder branch July 26, 2021 19:59
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

Successfully merging this pull request may close these issues.

Placeholders for the original PR author, and user that made the label or comment
1 participant