mirror of
https://github.com/MunGell/awesome-for-beginners.git
synced 2026-05-02 05:40:44 -07:00
Merge pull request #1985 from MunGell/invalid-pr-check-change
Improve the clarity of the current invalid PR check
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Check on Invalid PR
|
name: Check README.md edit - invalid PR check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
@@ -20,14 +20,14 @@ jobs:
|
|||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
body: 'This PR is not valid. Please read [contributing guidelines](https://github.com/MunGell/awesome-for-beginners/blob/main/CONTRIBUTING.md).'
|
body: 'This PR is not valid (README.md file should not be manually edited). Please read [contributing guidelines](https://github.com/MunGell/awesome-for-beginners/blob/main/CONTRIBUTING.md).'
|
||||||
});
|
});
|
||||||
if (context.payload.pull_request.labels.indexOf('Invalid') === -1) {
|
if (context.payload.pull_request.labels.indexOf('invalid: README.md edited') === -1) {
|
||||||
await github.rest.issues.addLabels({
|
await github.rest.issues.addLabels({
|
||||||
issue_number: context.issue.number,
|
issue_number: context.issue.number,
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
labels: ['Invalid']
|
labels: ['invalid: README.md edited']
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await github.rest.pulls.update({
|
await github.rest.pulls.update({
|
||||||
|
|||||||
Reference in New Issue
Block a user