forked from External/mediamtx
after a release, post to issues once (#2691)
This commit is contained in:
parent
7a1e155531
commit
e8f57153d5
1 changed files with 15 additions and 9 deletions
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue