Skip to content

Commit b865493

Browse files
maint: Add stale github action (#4220)
* maint: Add stale github action * add changelog entry * add exempt PR labels * increase close days to 14 * update contributing.md for stale PRs * Update cron schedule Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> * update stale message * clean-up --------- Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
1 parent 3fcabc3 commit b865493

3 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/stale.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Mark stale PRs
2+
3+
on:
4+
schedule:
5+
- cron: "12 3 * * *"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
stale:
13+
permissions:
14+
contents: read
15+
issues: write
16+
pull-requests: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
days-before-pr-stale: 14
23+
days-before-pr-close: 14
24+
days-before-issue-stale: -1
25+
days-before-issue-close: -1
26+
stale-pr-message: >
27+
This PR has been automatically marked as stale because it has not had
28+
any activity for 14 days. It will be closed if no further activity
29+
occurs within 14 days of this comment.
30+
31+
If you're still working on this, please add a comment or push new commits.
32+
close-pr-message: >
33+
This PR has been closed due to inactivity. Please reopen if you would
34+
like to continue working on it.
35+
exempt-pr-labels: "hold,WIP,blocked-by-spec,do not merge"

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212
## Unreleased
1313

14+
- Add stale PR GitHub Action
15+
([#4220](https://github.com/open-telemetry/opentelemetry-python/pull/4220))
16+
1417
### Added
1518

1619
- Add Python 3.14 support

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-t
3131
- [How to Receive Comments](#how-to-receive-comments)
3232
- [How to Get PRs Reviewed](#how-to-get-prs-reviewed)
3333
- [How to Get PRs Merged](#how-to-get-prs-merged)
34+
- [Stale PRs](#stale-prs)
3435
- [Design Choices](#design-choices)
3536
- [Focus on Capabilities, Not Structure Compliance](#focus-on-capabilities-not-structure-compliance)
3637
- [Running Tests Locally](#running-tests-locally)
@@ -241,6 +242,12 @@ A PR is considered to be **ready to merge** when:
241242

242243
Any Approver / Maintainer can merge the PR once it is **ready to merge**.
243244

245+
### Stale PRs
246+
247+
PRs with no activity for 14 days will be automatically marked as stale and closed after a further 14 days of inactivity. To prevent a PR from being marked stale, ensure there is regular activity (commits, comments, reviews, etc).
248+
249+
Project managers can also exempt a PR from this by applying one of the following labels: `hold`, `WIP`, `blocked-by-spec`, `do not merge`.
250+
244251
## Design Choices
245252

246253
As with other OpenTelemetry clients, opentelemetry-python follows the

0 commit comments

Comments
 (0)