Skip to content

Include option to ignore PR activity #435

@SamirMarin

Description

@SamirMarin

Background

We currently use github actions on one of our gitops repos to autoupdate PRs with the latest main branch. Because of this PRs are updated frequently and considered to have a high amount of activity.

We wanted to also use github actions (actions/stale) to close PRs that had been open for several days. Currently the following is supported by action/stale:

with:
          repo-token: ${{ token }}
          stale-pr-message: 'This PR is stale because it has been open for 5 days. Remove stale label or this PR will be closed in 3 days.'
          remove-pr-stale-when-updated: false
          days-before-pr-stale: 5
          days-before-pr-close: 3

This works as expected marking any PR as stale (that has not had any activity for 5 days) and closing it 3 days later if still labeled stale.

This however falls slightly short of our use case. For our use case we would like the option to ignore PR activity and mark the PR as stale if it has been open for 5 days (activity or no activity).

Request

Add a flag option such as ignore-pr-activity that ignores PR activity if set to true and simply tracks the time from when the PR was open.
example:

with:
          repo-token: ${{ token }}
          stale-pr-message: 'This PR is stale because it has been open for 5 days. Remove stale label or this PR will be closed in 3 days.'
          remove-pr-stale-when-updated: false
          ignore-pr-activity: true  # defaults to false, when true will count time from the day PR was open ignoring all activity
          days-before-pr-stale: 5
          days-before-pr-close: 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions