From df502f3d21846881fc43c8c029cebc0455677430 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Thu, 19 Feb 2026 17:36:34 +0000 Subject: [PATCH 1/4] maint: Add stale github action --- .github/workflows/stale.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..80b733c0ac --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,33 @@ +name: Mark stale PRs + +on: + schedule: + # hourly at minute 23 + - cron: "23 * * * *" + workflow_dispatch: + +permissions: + contents: read + +jobs: + stale: + permissions: + contents: read + issues: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + days-before-pr-stale: 14 + days-before-pr-close: 7 + days-before-issue-stale: -1 + days-before-issue-close: -1 + stale-pr-message: > + This PR has been automatically marked as stale because it has not had + any activity for 14 days. It will be closed if no further activity + occurs within 7 days of this comment. + close-pr-message: > + This PR has been closed due to inactivity. Please reopen if you would + like to continue working on it. From eb57181b71b8824b3592f1b4dfc65ddc48f518f6 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Thu, 19 Feb 2026 17:50:28 +0000 Subject: [PATCH 2/4] add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6c0888de7..50b26a16ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Add stale PR GitHub Action + ([#4926](https://github.com/open-telemetry/opentelemetry-python/pull/4926)) - `opentelemetry-sdk`: Clarify timeout units in environment variable documentation ([#4906](https://github.com/open-telemetry/opentelemetry-python/pull/4906)) - `opentelemetry-exporter-otlp-proto-grpc`: Fix re-initialization of gRPC channel on UNAVAILABLE error From fd368c0e13589bbf8349f8a08e8ff96ded82986f Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Fri, 20 Feb 2026 10:08:04 +0000 Subject: [PATCH 3/4] increase close days, add exempt pr labels --- .github/workflows/stale.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 80b733c0ac..567b279361 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -21,13 +21,14 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-pr-stale: 14 - days-before-pr-close: 7 + days-before-pr-close: 14 days-before-issue-stale: -1 days-before-issue-close: -1 stale-pr-message: > This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity - occurs within 7 days of this comment. + occurs within 14 days of this comment. close-pr-message: > This PR has been closed due to inactivity. Please reopen if you would like to continue working on it. + exempt-pr-labels: "hold,WIP,blocked by spec,do not merge" From bbeb9be1056c8e15876e8258cdfd8c91c8bf42e8 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Fri, 20 Feb 2026 10:08:18 +0000 Subject: [PATCH 4/4] update contributing with stale PRs section --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00c8a0c8b0..27703db859 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -291,6 +291,12 @@ Please fork this repo in a personal Github account instead. One of the maintainers will merge the PR once it is **ready to merge**. +### Stale PRs + +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). + +Project managers can also exempt a PR from this by applying one of the following labels: `hold`, `WIP`, `blocked by spec`, `do not merge`. + ## Design Choices As with other OpenTelemetry clients, opentelemetry-python follows the