From df502f3d21846881fc43c8c029cebc0455677430 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Thu, 19 Feb 2026 17:36:34 +0000 Subject: [PATCH 1/7] 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/7] 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/7] 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/7] 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 From 598808bb6dc8b0156c9b86d7c9c3f5532d050482 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Mon, 23 Feb 2026 10:12:41 +0000 Subject: [PATCH 5/7] Update cron schedule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com> --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 567b279361..5bd6c4d537 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,7 +3,7 @@ name: Mark stale PRs on: schedule: # hourly at minute 23 - - cron: "23 * * * *" + - cron: "12 3 * * *" workflow_dispatch: permissions: From 5503e5697c2abd273e9f3dd231a4b6f9f233445c Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Mon, 23 Feb 2026 10:15:41 +0000 Subject: [PATCH 6/7] update stale message --- .github/workflows/stale.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5bd6c4d537..e75442f1a6 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -28,6 +28,8 @@ jobs: 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 14 days of this comment. + + If you're still working on this, please add a comment or push new commits. close-pr-message: > This PR has been closed due to inactivity. Please reopen if you would like to continue working on it. From 63fea439a972127c71b0f44823c092794be253d6 Mon Sep 17 00:00:00 2001 From: Mike Goldsmith Date: Mon, 23 Feb 2026 10:20:39 +0000 Subject: [PATCH 7/7] clean-up --- .github/workflows/stale.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e75442f1a6..a081b7daed 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,7 +2,6 @@ name: Mark stale PRs on: schedule: - # hourly at minute 23 - cron: "12 3 * * *" workflow_dispatch: