diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000000..a081b7daed --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,35 @@ +name: Mark stale PRs + +on: + schedule: + - cron: "12 3 * * *" + 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: 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 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. + exempt-pr-labels: "hold,WIP,blocked by spec,do not merge" diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b925076a..42b2391c40 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`: Drop unused Jaeger exporter environment variables (exporter removed in 1.22.0) ([#4918](https://github.com/open-telemetry/opentelemetry-python/issues/4918)) - `opentelemetry-sdk`: Clarify timeout units in environment variable documentation 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