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

Add stale issue and PR labeler workflows #2485

Closed

Conversation

thompson-shaun
Copy link
Collaborator

This PR adds Close Stale Issues and PR Labeler action workflows. Durations for stale item comments and closure are initial suggestions.

A first attempt was made in a previous PR that had great comments (thanks @crazy-max and @thaJeztah). This iteration drops the 3rd-party auto-labeler and strictly focuses on official GitHub actions.

Goals

  • Encourage timely processing of Issues and PRs
  • Automatically identify areas being modified by a PR (slight toil reduction, faster binning, may yield insights over time).

Close Stale Issues

Warns and then closes issues and PRs that have had no activity for a specified amount of time.

General

The configuration as proposed will exempt Issues and PRs that have been assigned milestones (even arbitrarily long ones such v-future). In addition, the workflow would process only items created after the start-date. We can adjust this date as desired. There is also an option to exempt items that have been assigned to a user.

exempt-milestones: true
start-date: '2024-05-01T00:00:00+0000'

Issues

Notable configuration options

# durations before stale and close actions are taken
days-before-issue-stale: <integer>
days-before-issue-close: <integer>
# labels applied as the issue transitions from active -> stale -> closed
stale-issue-label: 'stale' 
close-issue-label: 'rotten'
# labels that can be applied to avoid stale processing
exempt-issue-labels: 'frozen'

Pull Requests

Notable configuration options

# durations before stale and close actions are taken
days-before-pr-stale: <integer>
days-before-pr-close: <integer>
# labels applied as the issue transitions from active -> stale -> closed
stale-pr-label: 'stale'
close-pr-label: 'rotten'
# labels that can be applied to avoid stale processing
exempt-pr-labels: 'frozen'

Pull Request Labeler

Automatically label new pull requests based on the paths of files being changed or the branch name.

At present, this is primarily applying area/* labels but can be extended if it helps.

.github/labeler.yml Outdated Show resolved Hide resolved
.github/labeler.yml Outdated Show resolved Hide resolved
Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

Some suggestions, can you also squash commits please? Thanks

.github/labeler.yml Outdated Show resolved Hide resolved
.github/workflows/labeler.yml Outdated Show resolved Hide resolved
.github/workflows/close-stale-issues.yml Outdated Show resolved Hide resolved
.github/workflows/close-stale-issues.yml Outdated Show resolved Hide resolved
.github/workflows/close-stale-issues.yml Outdated Show resolved Hide resolved
.github/workflows/close-stale-issues.yml Outdated Show resolved Hide resolved
Signed-off-by: Shaun Thompson <shaun.thompson@docker.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max
Copy link
Member

Pushed extra commits for stale workflow.

First one to prefix labels with status/ and add them to the repo: https://github.com/docker/buildx/labels?q=status%2F

image

Move permissions to job similar to labeler workflow.

And last one related to #2485 (comment) so we can manually trigger the workflow to check its behavior. Tested in:

image

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

LGTM

PTAL @tonistiigi @thaJeztah as I pushed extra commits 🙏

@crazy-max crazy-max requested a review from tonistiigi June 4, 2024 08:35
@thompson-shaun thompson-shaun added this to the v0.future milestone Jun 18, 2024
@thompson-shaun thompson-shaun marked this pull request as draft June 18, 2024 11:40
@thompson-shaun
Copy link
Collaborator Author

I'm going to break apart this submission into multiple parts to help isolate changes that might need more discussion.

  • PR Labeler
  • Stale issue processing + project processing guide

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