Skip to content

Commit

Permalink
chore: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Apr 11, 2024
1 parent 98af652 commit 95bab53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
permissions:
contents: write
jobs:
cleanup:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,11 +40,13 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const owner = context.repo.owner;
const headBranch = `${owner}:cleanup`;
const { data: pullRequests } = await github.rest.pulls.list({
owner: context.repo.owner,
owner: owner,
repo: context.repo.repo,
state: 'open',
head: 'hexojs:cleanup',
head: headBranch,
base: 'master'
});
return pullRequests.length > 0;
Expand Down

0 comments on commit 95bab53

Please sign in to comment.