Skip to content
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

.github/workflows: Add Stale Check #4980

Closed
wants to merge 1 commit into from

Conversation

makubacki
Copy link
Member

@makubacki makubacki commented Oct 31, 2023

Adds a GitHub workflow that uses the actions/stale GitHub action to automatically leave notifications on and close PRs that have had no activity for a long time.

Note: Modifications to a PR reset the staleness counter. This
includes pushing to the PR, adding a label to the PR,
commenting on the PR, etc.

If a PR has been marked "stale", simply leaving a comment will
reset the counter.

Configuration choices:

  1. Do not attempt to close edk2 GitHub issues.
  2. Mark edk2 PRs as stale if no activity in the last 60 days. Close PRs marked stale if no further activity in 7 days.
  3. Do not exempt PRs with a "push" label.
  4. Run the check once daily. Allow manual runs from those that have permission to run GitHub workflows.
  5. Add the label "stale" to the PR when it enters the stale state.

Rationale:

  1. We do not use issues often enough. The limited usage of GitHub issues in Tianocore org GitHub projects are in another repo not impacted by this workflow and expected to track long term tasks.
  2. This is the default value. In non-edk2 projects, I've seen these times work fairly well to identify PRs that have fallen stale.
  3. Adding a "push" label resets the stale timer. If a PR has had a "push" label for 60+ days and has not been fixed for submission, then it is has very likely been abandoned.
  4. This is sufficient to update PRs on the day granularity the configuration settings are applied against.
  5. The label makes it easy to filter stale PRs in the PR list and write automation around PRs that are stale. It's also an obvious visual identifier that a PR needs attention in the PR list.

Cc: Sean Brogan [email protected]
Cc: Michael Kubacki [email protected]
Cc: Michael D Kinney [email protected]
Cc: Laszlo Ersek [email protected]
Signed-off-by: Michael Kubacki [email protected]

Notes:

I tested this workflow on my edk2 fork:

Here's an example of a PR it did not mark stale there:

Here's an example of a PR it did mark stale there:

Adds a GitHub workflow that uses the actions/stale GitHub action to
automatically leave notifications on and close PRs that have had no
activity for a long time.

Note: Modifications to a PR reset the staleness counter. This
      includes pushing to the PR, adding a label to the PR,
      commenting on the PR, etc.

      If a PR has been marked "stale", simply leaving a comment will
      reset the counter.

Configuration choices:

1. Do not attempt to close edk2 GitHub issues.
2. Mark edk2 PRs as stale if no activity in the last 60 days. Close
   PRs marked stale if no further activity in 7 days.
3. Do not exempt PRs with a "push" label.
4. Run the check once daily. Allow manual runs from those that have
   permission to run GitHub workflows.
5. Add the label "stale" to the PR when it enters the stale state.

Rationale:

1. We do not use issues often enough. The limited usage of GitHub
   issues in Tianocore org GitHub projects are in another repo not
   impacted by this workflow and expected to track long term tasks.
2. This is the default value. In non-edk2 projects, I've seen these
   times work fairly well to identify PRs that have fallen stale.
3. Adding a "push" label resets the stale timer. If a PR has had a
   "push" label for 60+ days and has not been fixed for submission,
   then it is has very likely been abandoned.
4. This is sufficient to update PRs on the day granularity the
   configuration settings are applied against.
5. The label makes it easy to filter stale PRs in the PR list and
   write automation around PRs that are stale. It's also an obvious
   visual identifier that a PR needs attention in the PR list.

Cc: Sean Brogan <[email protected]>
Cc: Michael Kubacki <[email protected]>
Cc: Michael D Kinney <[email protected]>
Cc: Laszlo Ersek <[email protected]>
Signed-off-by: Michael Kubacki <[email protected]>
@makubacki
Copy link
Member Author

Current push is Patch v1 from the mailing list - https://edk2.groups.io/g/devel/message/110355

@makubacki
Copy link
Member Author

Closing since merged via Queue PR #4984.

@makubacki makubacki closed this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant