Skip to content

Commit

Permalink
Increase page size & debug test rule removal (#2211)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-dunn-sublime authored Dec 11, 2024
1 parent 1298a8b commit f95a7bb
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/clear-old-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ jobs:
uses: actions/github-script@v4
with:
script: |
github.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open'
}).then((result) => {
const openPRs = result.data.map(pr => pr.number);
github.paginate(
github.pulls.list,
{
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
},
(response) => response.data.map((pr) => pr.number)
).then((openPRs) => {
console.log(`::set-output name=open_prs::${openPRs.join(',')}`);
});
Expand All @@ -43,6 +46,8 @@ jobs:
echo "This is a forked repository. Skipping the job."
exit 0
fi
echo "Open PRs: [$OPEN_PRS]"
echo "Scheduled cleanup" > message.txt
echo "" >> message.txt
Expand All @@ -61,6 +66,7 @@ jobs:
fi
done
echo "$file is in open PR: $in_open_pr. File PR num: $file_pr_num"
if [[ "$in_open_pr" = "false" ]]; then
rm $file
echo "Removed $file_pr_num" >> ../message.txt
Expand Down

0 comments on commit f95a7bb

Please sign in to comment.