Skip to content

Commit 2308baf

Browse files
maint: Add stale github action (#4926)
* maint: Add stale github action * add changelog entry * increase close days, add exempt pr labels * update contributing with stale PRs section * 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 99b47df commit 2308baf

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212

1313
## Unreleased
1414

15+
- Add stale PR GitHub Action
16+
([#4926](https://github.com/open-telemetry/opentelemetry-python/pull/4926))
1517
- `opentelemetry-sdk`: Drop unused Jaeger exporter environment variables (exporter removed in 1.22.0)
1618
([#4918](https://github.com/open-telemetry/opentelemetry-python/issues/4918))
1719
- `opentelemetry-sdk`: Clarify timeout units in environment variable documentation

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ Please fork this repo in a personal Github account instead.
291291

292292
One of the maintainers will merge the PR once it is **ready to merge**.
293293

294+
### Stale PRs
295+
296+
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).
297+
298+
Project managers can also exempt a PR from this by applying one of the following labels: `hold`, `WIP`, `blocked by spec`, `do not merge`.
299+
294300
## Design Choices
295301

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

0 commit comments

Comments
 (0)