Skip to content

Commit 6f94c8a

Browse files
ci: adds age-gate (#9112)
* ci: adds age-gate * update action with a small fork-pr ux fix
1 parent e5ec412 commit 6f94c8a

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.changeset/upset-walls-bet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Security Notes
2+
# Only selected Actions are allowed within this repository. Please refer to (https://github.com/nodejs/nodejs.org/settings/actions)
3+
# for the full list of available actions. If you want to add a new one, please reach out a maintainer with Admin permissions.
4+
# REVIEWERS, please always double-check security practices before merging a PR that contains Workflow changes!!
5+
# AUTHORS, please only use actions with explicit SHA references, and avoid using `@master` or `@main` references or `@version` tags.
6+
7+
name: Pull Request Age Gate
8+
9+
on:
10+
pull_request:
11+
branches:
12+
- main
13+
types:
14+
- opened
15+
- synchronize
16+
- reopened
17+
- labeled
18+
- unlabeled
19+
schedule:
20+
# Hourly, so that open Pull Requests flip from red to green on their own
21+
# once enough wall-clock time has passed, without needing a new commit
22+
- cron: '0 * * * *'
23+
24+
permissions: {}
25+
26+
concurrency:
27+
# Scheduled runs have no Pull Request in context and evaluate every open Pull
28+
# Request, so they are keyed by run id to avoid cancelling one another
29+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
30+
cancel-in-progress: true
31+
32+
jobs:
33+
age-gate:
34+
name: Age Gate
35+
runs-on: ubuntu-latest
36+
permissions:
37+
# Required by `bmuenzenmeyer/pr-age-gate` to create/update the check run
38+
checks: write
39+
# Required by `bmuenzenmeyer/pr-age-gate` to read Pull Request metadata
40+
pull-requests: read
41+
steps:
42+
- name: Harden Runner
43+
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
44+
with:
45+
egress-policy: audit
46+
47+
- name: Check Pull Request Age
48+
uses: bmuenzenmeyer/pr-age-gate@d4243cf80a6386863234c6fc6be01f19bf4a6bfc # v0.2.3
49+
with:
50+
min-hours: '48'
51+
bypass-labels: fast-track

0 commit comments

Comments
 (0)