Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/upset-walls-bet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Comment on lines +1 to +2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need a changeset, the check is non blocking

51 changes: 51 additions & 0 deletions .github/workflows/pull-request-age-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Security Notes
# Only selected Actions are allowed within this repository. Please refer to (https://github.com/nodejs/nodejs.org/settings/actions)
# for the full list of available actions. If you want to add a new one, please reach out a maintainer with Admin permissions.
# REVIEWERS, please always double-check security practices before merging a PR that contains Workflow changes!!
# AUTHORS, please only use actions with explicit SHA references, and avoid using `@master` or `@main` references or `@version` tags.

name: Pull Request Age Gate

on:
pull_request:
Comment thread
bmuenzenmeyer marked this conversation as resolved.
branches:
- main
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
schedule:
# Hourly, so that open Pull Requests flip from red to green on their own
# once enough wall-clock time has passed, without needing a new commit
- cron: '0 * * * *'

permissions: {}

concurrency:
# Scheduled runs have no Pull Request in context and evaluate every open Pull
# Request, so they are keyed by run id to avoid cancelling one another
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
Comment thread
bmuenzenmeyer marked this conversation as resolved.

jobs:
age-gate:
name: Age Gate
runs-on: ubuntu-latest
permissions:
# Required by `bmuenzenmeyer/pr-age-gate` to create/update the check run
checks: write
# Required by `bmuenzenmeyer/pr-age-gate` to read Pull Request metadata
pull-requests: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit

- name: Check Pull Request Age
uses: bmuenzenmeyer/pr-age-gate@d4243cf80a6386863234c6fc6be01f19bf4a6bfc # v0.2.3
with:
min-hours: '48'
bypass-labels: fast-track
Comment thread
bmuenzenmeyer marked this conversation as resolved.
Loading