Skip to content

.github/workflows/update-all-prs.yml #8642

.github/workflows/update-all-prs.yml

.github/workflows/update-all-prs.yml #8642

on:
schedule:
- cron: "0 9-19 * * mon-fri" # Every hour during working hours(ish)
workflow_dispatch:
jobs:
unlabel-prs-as-new:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- id: select-pull-requests
name: Select PRs older than 14 days
uses: actions/github-script@v7
with:
script: |
const pullRequests = require("./.github/actions/pull-requests");
return pullRequests.olderThan(
{ github, context },
{ days: 14 },
);
- if: steps.select-pull-requests.outputs.result
name: Unlabel old enough PRs as "new"
uses: actions/github-script@v7
with:
script: |
const pullRequests = require("./.github/actions/pull-requests");
return pullRequests.removeLabelFrom(
{ github, context },
{
ids: ${{ steps.select-pull-requests.outputs.result }},
labelName: "new",
},
);