Closed mathomp4 closed 1 year ago
Started looking in to this today. Rough notes for what it needs:
function tmpl(t, o) {
return t.replace(/\{\{\s*(.*?)\s*\}\}/g, function (item, param) {
return o[param];
});
}
const comment = core.getInput("comment");
const errorMessage = tmpl(comment, {
mode,
allowed: allowedLabels.join(", "),
applied: appliedLabels.join(", "),
});
This is more of a question/feature request than an issue, but I thought I'd ask.
Recently I transitioned my repos from an old Heroku label enforcer to this very cool GitHub Action. One of the things I loved about it was the fact that it can make a comment when something goes wrong. Nice.
However, I was wondering how hard it would be to make that comment customizable? I ask because in our systems we have two different types of labels. One set are required to merge, but we use a different set of labels to "block" the PR (because someone needs to approve, or the PR in question depends on another PR, etc.). You can see the comments made by both of these here in my test repo.
Now it does work and the comment feature is MUCH nicer than what we had before (which was people asking me "Why is my PR not able to merge?"). But it might be easier for them to understand with a comment like:
or:
Of course, I don't know how these GitHub Actions even work, so if something like this takes more than like 5 minutes of effort, probably not worth it! 😄