Merge pull request #29236 from acierto/githubissueslabel

Made "github:issues:label" action idempotent
This commit is contained in:
Ben Lambert
2025-03-17 08:33:14 +01:00
committed by GitHub
2 changed files with 15 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-github': patch
---
Made "github:issues:label" action idempotent
@@ -101,11 +101,16 @@ export function createGithubIssuesLabelAction(options: {
);
try {
await client.rest.issues.addLabels({
owner,
repo,
issue_number: number,
labels,
await ctx.checkpoint({
key: `github.issues.add.label.${owner}.${repo}.${number}`,
fn: async () => {
await client.rest.issues.addLabels({
owner,
repo,
issue_number: number,
labels,
});
},
});
} catch (e) {
assertError(e);