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 labels-to-remove-when-stale option #770

Open
arnodirlam opened this issue Jul 5, 2022 · 4 comments
Open

Add labels-to-remove-when-stale option #770

arnodirlam opened this issue Jul 5, 2022 · 4 comments
Labels
enhancement New feature or request keep need eyes Feature request needs additional triaging by leads

Comments

@arnodirlam
Copy link

The problem

We have a workflow where a deploy label triggers the deployment of a dedicated test environment on AWS via Terraform (like Heroku's "review apps"). When it's removed, the test environment is destroyed. We'd like to keep this flow, but automatically removed the label when the PR becomes stale. Right now, there's only an option to add/remove labels when a PR becomes unstale.

The solution

Please add an option labels-to-remove-when-stale.

Basically like the existing labels-to-remove-when-unstale but triggering when the issue/PR becomes stale (not when it becomes unstale).

Thank you very much for your great work! 🙏

@mulhotavares
Copy link

That would be interesting.
When a PR comes stale, there are labels that we want to remove automatically.

@ge65cer
Copy link

ge65cer commented Oct 18, 2022

+1

1 similar comment
@Lasim
Copy link

Lasim commented Nov 14, 2022

+1

@panticmilos panticmilos mentioned this issue Mar 16, 2023
2 tasks
@panticmilos
Copy link
Contributor

hi @arnodirlam, we have released a new major version of the action that is including your feature request.

Could you confirm it is working as expected?

@dsame dsame added the need eyes Feature request needs additional triaging by leads label Aug 9, 2023
kayman-mk referenced this issue in Hapag-Lloyd/Renovate-Global-Configuration Nov 19, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/stale](https://github.com/actions/stale) | action | major |
`v7.0.0` -> `v8.0.0` |

---

### Release Notes

<details>
<summary>actions/stale (actions/stale)</summary>

### [`v8.0.0`](https://github.com/actions/stale/releases/tag/v8.0.0)

[Compare
Source](https://github.com/actions/stale/compare/v7.0.0...v8.0.0)

:warning: This version contains breaking changes :warning:

#### What's Changed

- New option labels-to-remove-when-stale enables users to specify list
of comma delimited labels that will be removed when the issue or PR
becomes stale by [@&#8203;panticmilos](https://github.com/panticmilos)
[https://github.com/actions/stale/issues/770](https://github.com/actions/stale/issues/770)
- Skip deleting the branch in the upstream of a forked repo by
[@&#8203;dsame](https://github.com/dsame)
[https://github.com/actions/stale/pull/913](https://github.com/actions/stale/pull/913)
- abort the build on the error by
[@&#8203;dsame](https://github.com/dsame) in
[https://github.com/actions/stale/pull/935](https://github.com/actions/stale/pull/935)

#### Breaking Changes

- In this release we prevent scenarios when the build is not interrupted
on some exceptions, which led to successful builds when they are
supposed to fail

#### Example

```yaml
name: 'Remove labels when the issue or PR becomes stale'
on:
  schedule:
    - cron: '30 1 * * *'

permissions:
    pull-requests: write

jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v8
        with:
          labels-to-remove-when-stale: 'label1,label2'
```

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Hapag-Lloyd/Renovate-Global-Configuration).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request keep need eyes Feature request needs additional triaging by leads
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
@arnodirlam @dsame @Lasim @luketomlinson @panticmilos @ge65cer @mulhotavares and others