ci: reduce unnecessary pr-filter runs (#2033)
- Checking the repository of the PR is more effective than checking the label to identify bot-initiated PRs - This change also allows more flexible PR body definitions for developers with write access to the repository
This commit is contained in:
parent
2f844978aa
commit
d51345e297
2 changed files with 2 additions and 2 deletions
1
.github/workflows/pr-filter.yml
vendored
1
.github/workflows/pr-filter.yml
vendored
|
@ -6,6 +6,7 @@ on:
|
|||
|
||||
jobs:
|
||||
check-template:
|
||||
if: github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
|
3
.github/workflows/scripts/pr-filter.js
vendored
3
.github/workflows/scripts/pr-filter.js
vendored
|
@ -16,8 +16,7 @@ module.exports = async ({ github, context, core }) => {
|
|||
const action = context.payload.action;
|
||||
|
||||
const isValid =
|
||||
pr.labels.length > 0 || // PR create by Dependabot would have labels
|
||||
(markdown !== '' && hasTypes(markdown) && hasDescription(markdown));
|
||||
markdown !== '' && hasTypes(markdown) && hasDescription(markdown);
|
||||
|
||||
if (!isValid) {
|
||||
await github.rest.pulls.update({
|
||||
|
|
Loading…
Reference in a new issue