Skip to content

Add ability to sync multiple files #38

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

corentin-regent
Copy link

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 poetrel:major 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, another labels.toml file in the user's repository defining all other labels, and run labels 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant