-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 1.07 KB
/
update-all-prs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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",
},
);