diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 7b20d332..f9408566 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -37,14 +37,18 @@ jobs: with: script: | const { COMMIT_COUNT } = process.env + if (COMMIT_COUNT == 1) { - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ["multi-commit"] - }) + try { + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: ["multi-commit"] + }) + } catch(err) { + } } else { diff --git a/templates/github/.github/workflows/pr_checks.yml.j2 b/templates/github/.github/workflows/pr_checks.yml.j2 index 513c65e1..2e1a5e1f 100644 --- a/templates/github/.github/workflows/pr_checks.yml.j2 +++ b/templates/github/.github/workflows/pr_checks.yml.j2 @@ -33,14 +33,18 @@ jobs: with: script: | const { COMMIT_COUNT } = process.env + if (COMMIT_COUNT == 1) { - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ["multi-commit"] - }) + try { + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: ["multi-commit"] + }) + } catch(err) { + } } else {