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

Strip mentions from the pull request message #26

Closed
utdemir opened this issue May 23, 2020 · 6 comments · Fixed by #29
Closed

Strip mentions from the pull request message #26

utdemir opened this issue May 23, 2020 · 6 comments · Fixed by #29

Comments

@utdemir
Copy link

utdemir commented May 23, 2020

First, thanks for creating niv-updater-action, it is very convenient.

I have niv-updater-action running on my dotfiles repository, sending PR's every week. nixpkgs is one of the dependencies.

Turns out, the nixpkgs commit messages tend to include references to issues/pr's on nixpkgs repository, for example:

2020-05-23-162315_584x175_scrot

This means that every time niv-updater-action sends a PR my repository, GitHub will mention that PR in the mentioned issue; but most of the times, it'll be a nuisance on nixpkgs. It looks like this is already happening on the wild:

From: NixOS/nixpkgs#76994 (I know that I'm adding yet another mention here)
2020-05-23-162557_728x501_scrot

In order to keep the nixpkgs issues clean, it would be great for niv-updater-action to somehow strip those mentions by default.

I'm not sure what would be the best way to do it, I guess we can either have a postprocessing step on the commit message removing/escaping the mention-causing phrases, or we can just wrap the each commit message in code blocks.

@infinisil
Copy link

The same for usernames, e.g. see JJJollyjim/arewehackersyet#6 where @deliciouslytyped is being pinged since a commit subjects mentions them

@nomeata
Copy link

nomeata commented Jun 6, 2020

I find these links very useful (and actualy asked for the rewriting to make them possible – just leaving them as #123 would link to the wrong repo).

Maybe there is a way to have a link that doesn't trigger Github’s backlinking? Not according to https://git.luolix.topmunity/t/linking-to-an-issue-without-creating-a-reference/890/3

Is there a generic URL redirection service out there that the link could be wrapped in?

https://www.google.com/url?sa=t&url=https://github.com… might work, as in: this test.

@utdemir
Copy link
Author

utdemir commented Jun 7, 2020

@nomeata

Is there a generic URL redirection service out there that the link could be wrapped in?

I think that is a good idea.

DuckDuckGo's one seems to work, try: http://r.duckduckgo.com/l/?uddg=https://github.com

@knl
Copy link
Owner

knl commented Jul 6, 2020

Hi all, I'll take a look at this issue and submit a PR tomorrow. Sorry for such a late response, I never got a notification from GitHub that there is an open issue :(

knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
@knl
Copy link
Owner

knl commented Jul 7, 2020

@utdemir I created #29 to fix this issue, thanks for your patience. Would that work for you?

knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
@knl
Copy link
Owner

knl commented Jul 7, 2020

The same for usernames, e.g. see JJJollyjim/arewehackersyet#6 where @deliciouslytyped is being pinged since a commit subjects mentions them

@infinisil I created #31 to fix the issue you brought up.

@knl knl closed this as completed in #29 Jul 7, 2020
knl added a commit that referenced this issue Jul 7, 2020
Closes #26

niv-update-action changelog in a GitHub PR contains references (in the form
of `owner/repo#PR_number`), which GitHub nicely turns into links.
However, what GitHub also does is it creates a backreference in those
PRs back to the PR created by niv-update-action. This pollutes the
upstream projects. Thus, this change adds an option to use a redirector
service in order to still have links, but avoid having backreferences.
knl added a commit to dfinity/sdk that referenced this issue Jul 7, 2020
Various fixes in the output, to make it more correct, and avoid spamming
of GitHub histories. Should be faster, too.

This release brings the following:

Formatting:
* Fix: Add an empty line after the title. Now GitHub Commits list looks
  better.
* Fix: Remove preceeding space in the title
* Output branch name used by niv, so that it is clear what is being
  tracked
* Add a title prefix support via `title_prefix` option

Being nice:
* Reformat mentions in the changelog to reduce spamming of mentioned
  developers (now, @knl will not generate a GitHub notification when
  present in the changelog)
* Add option to avoid GitHub backreferencing the PR. That is, when we
  have #123 in the changelog, it will be a correct link to the correct
  repository, however, the referenced PR/issue will not contain a
  reference, thus reducing the spamming. See
  knl/niv-updater-action#26 for more details.
* Make the location of `sources.json` customizable

Performance:
* Replace the use of jo with jq, thus avoiding to install jo
* Do not install hub CLI, as it is present in the default image. This
  should avoid installing hub, speeding up the start.
knl added a commit to dfinity/motoko that referenced this issue Jul 7, 2020
Various fixes in the output, to make it more correct, and avoid spamming
of GitHub histories. Should be faster, too.

This release brings the following:

Formatting:
* Fix: Add an empty line after the title. Now GitHub Commits list looks
  better.
* Fix: Remove preceeding space in the title
* Output branch name used by niv, so that it is clear what is being
  tracked
* Add a title prefix support via `title_prefix` option

Being nice:
* Reformat mentions in the changelog to reduce spamming of mentioned
  developers (now, @knl will not generate a GitHub notification when
  present in the changelog)
* Add option to avoid GitHub backreferencing the PR. That is, when we
  have #123 in the changelog, it will be a correct link to the correct
  repository, however, the referenced PR/issue will not contain a
  reference, thus reducing the spamming. See
  knl/niv-updater-action#26 for more details.
* Make the location of `sources.json` customizable

Performance:
* Replace the use of jo with jq, thus avoiding to install jo
* Do not install hub CLI, as it is present in the default image. This
  should avoid installing hub, speeding up the start.
knl added a commit to dfinity/sdk that referenced this issue Jul 7, 2020
Various fixes in the output, to make it more correct, and avoid spamming
of GitHub histories. Should be faster, too.

This release brings the following:

Formatting:
* Fix: Add an empty line after the title. Now GitHub Commits list looks
  better.
* Fix: Remove preceeding space in the title
* Output branch name used by niv, so that it is clear what is being
  tracked
* Add a title prefix support via `title_prefix` option

Being nice:
* Reformat mentions in the changelog to reduce spamming of mentioned
  developers (now, @knl will not generate a GitHub notification when
  present in the changelog)
* Add option to avoid GitHub backreferencing the PR. That is, when we
  have #123 in the changelog, it will be a correct link to the correct
  repository, however, the referenced PR/issue will not contain a
  reference, thus reducing the spamming. See
  knl/niv-updater-action#26 for more details.
* Make the location of `sources.json` customizable

Performance:
* Replace the use of jo with jq, thus avoiding to install jo
* Do not install hub CLI, as it is present in the default image. This
  should avoid installing hub, speeding up the start.
knl added a commit to dfinity/sdk that referenced this issue Jul 7, 2020
Various fixes in the output, to make it more correct, and avoid spamming
of GitHub histories. Should be faster, too.

This release brings the following:

Formatting:
* Fix: Add an empty line after the title. Now GitHub Commits list looks
  better.
* Fix: Remove preceeding space in the title
* Output branch name used by niv, so that it is clear what is being
  tracked
* Add a title prefix support via `title_prefix` option

Being nice:
* Reformat mentions in the changelog to reduce spamming of mentioned
  developers (now, @knl will not generate a GitHub notification when
  present in the changelog)
* Add option to avoid GitHub backreferencing the PR. That is, when we
  have #123 in the changelog, it will be a correct link to the correct
  repository, however, the referenced PR/issue will not contain a
  reference, thus reducing the spamming. See
  knl/niv-updater-action#26 for more details.
* Make the location of `sources.json` customizable

Performance:
* Replace the use of jo with jq, thus avoiding to install jo
* Do not install hub CLI, as it is present in the default image. This
  should avoid installing hub, speeding up the start.
nomeata pushed a commit to dfinity/motoko that referenced this issue Jul 7, 2020
Various fixes in the output, to make it more correct, and avoid spamming
of GitHub histories. Should be faster, too.

This release brings the following:

Formatting:
* Fix: Add an empty line after the title. Now GitHub Commits list looks
  better.
* Fix: Remove preceeding space in the title
* Output branch name used by niv, so that it is clear what is being
  tracked
* Add a title prefix support via `title_prefix` option

Being nice:
* Reformat mentions in the changelog to reduce spamming of mentioned
  developers (now, @knl will not generate a GitHub notification when
  present in the changelog)
* Add option to avoid GitHub backreferencing the PR. That is, when we
  have #123 in the changelog, it will be a correct link to the correct
  repository, however, the referenced PR/issue will not contain a
  reference, thus reducing the spamming. See
  knl/niv-updater-action#26 for more details.
* Make the location of `sources.json` customizable

Performance:
* Replace the use of jo with jq, thus avoiding to install jo
* Do not install hub CLI, as it is present in the default image. This
  should avoid installing hub, speeding up the start.
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 a pull request may close this issue.

4 participants