1
0
Fork 0
forked from External/mediamtx

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

This commit is contained in:
Alessandro Ros 2023-11-13 11:51:32 +01:00 committed by GitHub
parent 7a1e155531
commit e8f57153d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,20 +81,26 @@ jobs:
basehead: `${prevTag.commit.sha}...${curTag.commit.sha}`, basehead: `${prevTag.commit.sha}...${curTag.commit.sha}`,
}); });
const issues = {};
for (const commit of diff.data.commits) { for (const commit of diff.data.commits) {
for (const match of commit.commit.message.matchAll(/(^| |\()#([0-9]+)( |\)|$)/g)) { for (const match of commit.commit.message.matchAll(/(^| |\()#([0-9]+)( |\)|$)/g)) {
try { issues[match[2]] = 1;
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) {}
} }
} }
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: dockerhub:
needs: binaries needs: binaries
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04