maint: Add stale github action by MikeGoldsmith · Pull Request #4926 · open-telemetry/opentelemetry-python

Conversation

@MikeGoldsmith

Description

Adds a GitHub Action to automatically mark stale PRs and close them after inactivity, adapted from the opentelemetry-java workflow.

  • PRs with no activity for 14 days are marked stale by
    • by adding a stale comment from configuration
    • adding the "Stale" label
  • Stale PRs with no activity for a further 14 days are closed and add the close comment
  • PRs with an exempt label are ignored
  • Added section to CONTRIBUTING.md
  • Issues are not affected

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

CI-only change, no code tests applicable.

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@tammy-baylis-swi

@MikeGoldsmith

Thank you @MikeGoldsmith for making this happen!

Please could you also whip up a quick, generalized explanation under CONTRIBUTING Pull Requests.

I think the 14+7 day rule is generally fair. But maybe a 14+14 would be safer?

EDIT: Shoot I'm on the wrong PR 😉 will go to the other one open-telemetry/opentelemetry-python-contrib#4220

I do want to add the GHA to both core and contrib, but happy to tweak there first then copy here.

@MikeGoldsmith

I've updated this PR to match the one we have open for contrib:

  • increase stale / close days to 14+14
  • add exempt PR labels
  • add stale PRs section to CONTRIBUTING.md

pmcollins

emdneto

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
… into mike/add-stale-gha

emdneto

tammy-baylis-swi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@MikeGoldsmith

@tammy-baylis-swi

Please could someone add this to the PR review board

Done!

lmolkova

@xrmx

xrmx

xrmx approved these changes Mar 2, 2026