include dco-helper tag in comment

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-02-08 10:33:38 +01:00
parent 1239b113b9
commit f1a5d81696
+6 -3
View File
@@ -43,14 +43,17 @@ jobs:
repo,
issue_number: pull.number,
});
if (comments.find((c) => c.user.login === "github-actions[bot]")) {
if (comments.find((c) =>
c.user.login === "github-actions[bot]" &&
c.body.includes("<dco-helper>")
)
) {
console.log(`already commented on PR #${pull.number}, skipping`);
continue;
}
console.log(`creating comment on PR #${pull.number}`);
const body = `Thanks for the contribution!\nAll commits need to be DCO signed before merging. Please refer to the the [DCO section in CONTRIBUTING.md](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#developer-certificate-of-origin) or the [DCO](${checks.data.check_runs[0].html_url}) status for more info.`;
const body = `Thanks for the contribution!\nAll commits need to be DCO signed before merging. Please refer to the the [DCO section in CONTRIBUTING.md](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#developer-certificate-of-origin) or the [DCO](${checks.data.check_runs[0].html_url}) status for more info.<dco-helper>`;
await github.rest.issues.createComment({
repo,
owner,