Skip to content

Commit

Permalink
fix labels-from-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha authored Nov 5, 2024
1 parent e9854bd commit ec64311
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/labels-from-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ jobs:
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: ['release-ci'] });
}
if (const chlog = commentLines.find(line => line.startsWith("changelog-")) {
if (const previous = labels.find(label => label.name.startsWith("changelog-")) {
const chlog = commentLines.find(line => line.startsWith("changelog-");
if (chlog) {
const previous = labels.find(label => label.name.startsWith("changelog-");
if (previous)) {
await github.rest.issues.removeLabel({ owner, repo, issue_number, name: previous.name });
}
await github.rest.issues.addLabels({ owner, repo, issue_number, labels: [chlog] });
Expand Down

0 comments on commit ec64311

Please sign in to comment.