Skip to content

feat: Add an action of 'Close stale issue and PRs' in github worklfow #1083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Shouren
Copy link
Collaborator

@Shouren Shouren commented May 26, 2025

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
There are lots of issue and PRs which are already outdated remains open for this project. This PR helps close those issues and PRs automatically.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
@wawa0210 @archlitchi
I am not sure the current parameters in the stale.yaml is suitable for this project. Let me know if you have any suggestions.

Does this PR introduce a user-facing change?:

Copy link
Contributor

hami-robott bot commented May 26, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Shouren
Once this PR has been reviewed and has the lgtm label, please assign archlitchi for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions github-actions bot added kind/feature new function and removed kind/cleanup labels May 26, 2025
@hami-robott hami-robott bot added the size/S label May 26, 2025
@Shouren Shouren added kind/cleanup and removed kind/feature new function labels May 26, 2025
Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Flag Coverage Δ
unittests 61.08% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wawa0210
Copy link
Member

This PR is great.

If there are some other CNCF projects about issues, some research on PR processing will be more reference

@Shouren
Copy link
Collaborator Author

Shouren commented May 29, 2025

This PR is great.

If there are some other CNCF projects about issues, some research on PR processing will be more reference

A brief research on some projects in CNCF:

  • Prometheus
    • Runs daily at 22:16 UTC via a cron schedule, and can also be triggered manually.
    • A pull request is marked as stale if there's no activity for 60 days.
    • There is no automatic closing of stale pull requests or issues configured by this workflow.
    • Pull requests with the label keepalive are exempt from being marked as stale.
  • Etcd
    • Runs daily at 00:00 UTC.
    • An issue or pull request is marked as stale if there's no activity for 90 days.
    • A stale issue or pull request is closed if there's no further activity for 21 days after being marked stale.
    • Issues and pull requests with the labels stage/tracked or help wanted are exempt from being marked as stale.
  • Argo-workflows
    • Runs daily at 2:00 AM UTC.
    • An issue or pull request is marked as stale if it has the label problem/more information needed and has had no activity for 14 days.
    • A stale issue or pull request is closed if there's no further activity for 14 days after being marked stale.
    • No specific labels are configured to exempt items from being marked stale; instead, the workflow only processes items that already have the problem/more information needed label. This label is removed when an issue or PR becomes active again.
  • opentelemetry-collector
    • Runs daily at 03:12 UTC.
    • A pull request is marked as stale if there's no activity for 14 days. And An issue is marked as stale if there's no activity for 730 days (2 years).
    • A stale pull request is closed if no further activity occurs for 14 days after being marked stale. And A stale issue is closed if no further activity occurs for 30 days after being marked stale.
    • This workflow does not specify any labels to exempt pull requests or issues from being marked as stale or closed.

My opinion

  • Most of them runs a daily stale check, However i think a weekly stale check is enough for this project.
  • The conditions for stale and close differ. There should be a discussion on It, at least the condition for this project should fits the pace of release or online meeting.
  • Label for exempt is essential and the way Argo-workflows does should be taken into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants