Skip to content

Commit 9c9ba18

Browse files
committed
Merge #733: Edit 0.14.1 release notes to separate multiple PRs with "," instead of "/"
98b565a Plugins: update githubify for monotree PR mentions (David A. Harding) 29e6cda Edit 0.14.1 release notes to separate multiple PRs with "," instead of "/" (David A. Harding) Pull request description: As mentioned today in #bitcoin-core-dev IRC, the release notes for 0.21.0 will include at least one reference to a PR that was merged in the new GUI repository. laanwj said he'll put this in the notes as "gui/#nnnn", so this PR updates the plugin to handle that appropriately. To eliminate conflicts, one historic release note is updated to change from using `/` as a separator between PRs to using `,` as the separator. The comma is consistent with other release notes, such as that for 0.14.0. This change should be forward compatible for other possible monotree repos as long as they're part of the bitcoin-core organization and the release notes use the format `<repo-name>/#<pr-number>`, e.g. `wallet/#123`. ACKs for top commit: laanwj: Code review ACK 98b565a Tree-SHA512: 350ef4479d85182d31c487edee02391fd4f09cd95dfaad2186fe5af6a7b5e3ccadd9360022159eed0a9987a0dc703fdf41e7e7867fba522ba53c79298afba6ef
2 parents 9af8764 + 98b565a commit 9c9ba18

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

_plugins/githubify.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@ def render(context)
2626
## Convert #1234 into URL for the pull request
2727
## If #1234 links to an issue, GitHub automatically redirects
2828
#
29-
## Require at least two digits to reduce false positive matches
30-
output.gsub!(/#([0-9][0-9][0-9]*)/){ |s|
31-
'<a href="' + @repository_url + '/pull/' + $1 + '">' + s + '</a>'
29+
## Main repository; forbid prefix of "/" to avoid conflation with
30+
## other monotree repos like bitcoin-core/gui. Require at least a
31+
## double-digit number to reduce false positive matches (e.g. "fix thing,
32+
## try #2")
33+
output.gsub!(/(^|[^\/])#([0-9]+)/){ |s|
34+
$1 + '<a href="' + @repository_url + '/pull/' + $2 + '">#' + $2 + '</a>'
35+
}
36+
37+
## Other monotree repos; for repo "bitcoin-core/foo", PR format is "foo/#123"
38+
output.gsub!(/([a-z]+)\/#([0-9]+)/){ |s|
39+
'<a href="https://github.com/bitcoin-core/' + $1 + '/pull/' + $2 + '">' + s + '</a>'
3240
}
3341

3442
## Convert `123abcd` into URL for the commit

_releases/0.14.1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ git merge commit are mentioned.
117117
- #10133 `ab864d3` Clean up calculations of pcoinsTip memory usage (morcos)
118118

119119
### P2P protocol and network code
120-
- #9953/#10013 `d2548a4` Fix shutdown hang with >= 8 -addnodes set (TheBlueMatt)
120+
- #9953,#10013 `d2548a4` Fix shutdown hang with >= 8 -addnodes set (TheBlueMatt)
121121
- #10176 `30fa231` net: gracefully handle NodeId wrapping (theuni)
122122

123123
### Build system
@@ -127,8 +127,8 @@ git merge commit are mentioned.
127127
- #10060 `ddc2dd1` Ensure an item exists on the rpcconsole stack before adding (achow101)
128128

129129
### Mining
130-
- #9955/#10006 `569596c` Don't require segwit in getblocktemplate for segwit signalling or mining (sdaftuar)
131-
- #9959/#10127 `b5c3440` Prevent slowdown in CreateNewBlock on large mempools (sdaftuar)
130+
- #9955,#10006 `569596c` Don't require segwit in getblocktemplate for segwit signalling or mining (sdaftuar)
131+
- #9959,#10127 `b5c3440` Prevent slowdown in CreateNewBlock on large mempools (sdaftuar)
132132

133133
### Tests and QA
134134
- #10157 `55f641c` Fix the `mempool_packages.py` test (sdaftuar)

0 commit comments

Comments
 (0)