Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR adds the ability to synchronize the repository with labels defined in multiple
labels.toml
files.Use case
I created Poetrel, a GitHub action that (among other features) bumps the project version based on the provided PR label. For example, if the PR is labeled with
then the major version will be bumped when merging.
Because there are quite a few labels that are supported, I would like to provide an action that would synchronize the user's repository labels with Poetrel, using a
labels.toml
file defined in my repository. However I would also like to keep all the labels existing in the user's repo.So the solution is to have a
labels.toml
file in the Poetrel repository defining the Poetrel labels, anotherlabels.toml
file in the user's repository defining all other labels, and runlabels sync
with both files, which would combine all labels before pushing them to the repo.Regression
Note that I removed the functionality for writing the labels back to the
labels.toml
file after the sync, as implementing it with multiple files would require some refactoring, and I feel like it is not really necessary.Please let me know if this would be an issue for you.