One self-hosted app for your shows, movies and music.
CLA: a comment the bot can't post never fails the check (#251)
CoderLuii6e1dbf036266
diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.ymlindex 754fe35..cb78c4f 100644--- a/.github/workflows/cla.yml+++ b/.github/workflows/cla.yml@@ -161,7 +161,9 @@ jobs:await github.rest.reactions.createForIssueComment({ owner, repo, comment_id: f.comment_id, content: 'hooray' }).catch(() => {});await github.rest.issues.createComment({ owner, repo, issue_number: number, body:`<!-- holyarrs-cla-thanks:${f.id} -->\n` +- `π You're all set, @${f.login}! Your agreement to the [CLA](${doc}) is saved, and you won't be asked again on any future pull request. Thanks for helping make HolyArrs better π` });+ `π You're all set, @${f.login}! Your agreement to the [CLA](${doc}) is saved, and you won't be asked again on any future pull request. Thanks for helping make HolyArrs better π` })+ // The agreement is already saved; a thank-you that can't be posted must not fail the check.+ .catch((e) => core.warning(`thank-you comment not posted: ${e.message}`));}}@@ -203,7 +205,9 @@ jobs:parts.push(`π These commits use an email that isn't linked to a GitHub account, so I can't tell who wrote them: ${unlinked.map((s) => '`' + s + '`').join(', ')}. ` +'Add that email to your GitHub account (or redo those commits with your GitHub email), then push again or leave any comment here and I\'ll check again.');}- await github.rest.issues.createComment({ owner, repo, issue_number: number, body: parts.join('\n\n') });+ // The red check already names who still has to agree; a comment that can't be posted must not hide that.+ await github.rest.issues.createComment({ owner, repo, issue_number: number, body: parts.join('\n\n') })+ .catch((e) => core.warning(`CLA request comment not posted: ${e.message}`));# Without a working sign-in (wrong key, app not installed) nothing above# posts a status, so say so instead of leaving the check waiting forever.