Browse Source

after a release, post to issues once (#2691)

pull/2705/head
Alessandro Ros 2 years ago committed by GitHub
parent
commit
e8f57153d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      .github/workflows/release.yml

24
.github/workflows/release.yml

@ -81,20 +81,26 @@ jobs: @@ -81,20 +81,26 @@ jobs:
basehead: `${prevTag.commit.sha}...${curTag.commit.sha}`,
});
const issues = {};
for (const commit of diff.data.commits) {
for (const match of commit.commit.message.matchAll(/(^| |\()#([0-9]+)( |\)|$)/g)) {
try {
await github.rest.issues.createComment({
owner,
repo,
issue_number: parseInt(match[2]),
body: `This issue is mentioned in release ${curTag.name} 🚀\n`
+ `Check out the entire changelog by [clicking here](https://github.com/${owner}/${repo}/releases/tag/${curTag.name})`,
});
} catch (exc) {}
issues[match[2]] = 1;
}
}
for (const issue in issues) {
try {
await github.rest.issues.createComment({
owner,
repo,
issue_number: parseInt(issue),
body: `This issue is mentioned in release ${curTag.name} 🚀\n`
+ `Check out the entire changelog by [clicking here](https://github.com/${owner}/${repo}/releases/tag/${curTag.name})`,
});
} catch (exc) {}
}
dockerhub:
needs: binaries
runs-on: ubuntu-22.04

Loading…
Cancel
Save