-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
Preserve labels when updating PR #689
Comments
Hi @pauleve Thanks for opening this issue. I will look at improving the PR update to make this possible. |
@peter-evans I would like this as an optional thing because when it updates the pr I would like to be able to set if I want the labels reset or not (in which case I do because I then use an labeler action when build passes so then automerge could do it's job only when certain conditional things are true). Or perhaps if one does not want all labels to stay maybe they should list the specific labels that it wants this action to remove from the pull request. |
@AraHaan Interesting use case, thank you for sharing. I'm still thinking about how to implement this because this problem affects not just It's tricky to handle this well in a tidy way. I'm being very careful to not complicate the action and add too many configuration options. |
After giving this a lot of thought, I've decided to change the way the list type fields of the pull request are updated by the action. Rather than reset them, I want to default them to preserving any list content that already exists. From a UX perspective I think it's unexpected and not a good experience for the action to reset these fields, and it almost could be viewed as a bug. It was never my intention to support workflows that rely on the reset behaviour of list fields. @AraHaan What this means is that the action won't reset the |
sure https://github.com/Elskom/Sdk/ the workflows are under .github/workflows/. |
Thanks for your work on this issue! |
@pauleve Just to clarify, it is intentional that fields such as |
@AraHaan I see that you already added a step to your workflow to remove the https://github.com/Elskom/Sdk/blob/main/.github/workflows/dotnetcore.yml#L12-L18 |
True, but it is possibly best to extract it to another yml file. |
On closer inspection this issue only affects |
@AraHaan This might be a good alternative for you. You can remove the - name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
- uses: actions-ecosystem/action-remove-labels@v1
if: steps.cpr.outputs.pull-request-operation == 'updated'
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: |
automerge |
Released as @pauleve Sorry it took a while to resolve this. Thank you for reporting. |
Also @peter-evans remove labels can sometimes throw errors which then need to be handled to not fail the workflow (continue-on-error). |
It seems that assignees functionality does not work any longer with |
@arbourd Apologies. I introduced a bug with |
Subject of the issue
Whenever a PR gets updated, its labels are reset to the one for the PR creation.
It would be great to have a way to preserve labels on PR update.
Steps to reproduce
labels
specifiedThe text was updated successfully, but these errors were encountered: