mirror of
https://github.com/herdrdev/herdr.git
synced 2026-09-22 00:01:06 +00:00
chore: use approve command for contributor gate
This commit is contained in:
@@ -2,7 +2,7 @@ name: Approve Contributor
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
approve:
|
||||
@@ -29,8 +29,8 @@ jobs:
|
||||
const commentBody = context.payload.comment.body || '';
|
||||
const approvedFile = '.github/APPROVED_CONTRIBUTORS';
|
||||
|
||||
if (!/^\s*lgtm\b/i.test(commentBody)) {
|
||||
console.log('Comment does not match lgtm');
|
||||
if (!/(^|\s)\/approve(?=$|\s)/i.test(commentBody)) {
|
||||
console.log('Comment does not contain /approve');
|
||||
core.setOutput('status', 'skipped');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
'**Next steps:**',
|
||||
'1. Open an issue describing what you want to change and why',
|
||||
'2. Keep it concise and write in your own voice',
|
||||
'3. If a maintainer approves with `lgtm`, you will be added to the approved contributors list',
|
||||
'3. If a maintainer approves with `/approve`, you will be added to the approved contributors list',
|
||||
'4. Then you can submit your PR',
|
||||
'',
|
||||
`This PR will be closed automatically. See https://github.com/${context.repo.owner}/${context.repo.repo}/blob/${defaultBranch}/CONTRIBUTING.md for more details.`,
|
||||
|
||||
Reference in New Issue
Block a user