micnncim / action-label-syncer Goto Github PK
View Code? Open in Web Editor NEWGitHub Action to sync GitHub labels in the declarative way
Home Page: https://github.com/marketplace/actions/label-syncer
License: Apache License 2.0
GitHub Action to sync GitHub labels in the declarative way
Home Page: https://github.com/marketplace/actions/label-syncer
License: Apache License 2.0
It seems that this can fail silently. In the log, I can see the repositories listed. After that, I can see a long docker run
invocation and the whole thing completes successfully, while I didn't even provide a secret, so it should fail and I can confirm that I don't see my desired labels on those repos.
The current logging uses uber-go/zap, so it should adopt GitHub Actions style logging.
Thanks for this action, it's really helpful.
It would be helpful to clarify the behavior of the action. Based on using the action and reading github.go, it appears to be doing the following:
Is this correct?
I'm happy to submit a PR to update the README with this info.
Hello!
This GitHub action looks really good and very handy.
I would like to ask if it would be possible to implement that all repositories sync the labels from your organization.
In the GitHub organization settings, there is an option called Repository defaults
where you can specify default labels.
Sadly, they are only applied on newly created repositories so if you create a new label there, you would have to add this label for each existing repository manually which is really annoying.
Do you think it's possible to add a way to sync the repository labels on all existing organization repos?
In some cases it will be appreciated to don't remove unmanaged labels.
eg. dependabot adds some label to manage dependencies - I want leave untouched such labels.
In current situation I must managed labels added by other tools.
So option for this case will be good.
If I have a label bug
and I would like it to be type: bug
, I wish I could do something like this:
- name: "type: bug"
alias: "bug"
And then label-syncer would:
type: bug
if no label named either type: bug
or bug
exists, orbug
to be type: bug
This would make it much easier to make a set of existing repositories consistent.
Hi! I have used this workflow in many repositories, private and public and it was working great. However, in my most recent repository, the label sync is not working. The job completes successfully, no error, and no labels affected.
Here is my .labels file which triggers the build:
Any ideas why its failing? Did GitHub change something?
Hi and thanks for this action!!!
I have multiple repositories which I am using for developing 3D-Printer plugins.
All repos should use the same labels, so far so good. But in each repository I have different "feature labels".
I want to sync all labels started with "status" and "type". But the "feature" labes should not be synced, because these are different in each repo.
How can I do this? I think prune
is not the correct way....something like an reg-expression would be nice ;-)
Allow specifying a list of full repository names or regex patterns under repository list so that whenever a new repo, with name matching one of the regex patterns, is created in the organization, labels can be automatically synced to that new repo.
Removes the need to keep adding repositories in the action's repository list, whenever new ones are created.
Google's secrets sync action already has this functionality. I would like a similar functionality in this action as well.
For e.g., following structure of the current action:
- uses: micnncim/[email protected]
with:
prune: false # Do not delete existing labels, not present in manifest file.
manifest: .github/config/sync-labels.yaml
repository: |
my-org/repoA
my-org/repoB
my-org/repoB
your-org/repoX
your-org/repoY
token: ${{ secrets.PAT }}
should be converted to work as follows, as well:
- uses: micnncim/[email protected]
with:
prune: false # Do not delete existing labels, not present in manifest file.
manifest: .github/config/sync-labels.yaml
repository: |
^my-org/.*
^your-org/.*
token: ${{ secrets.PAT }}
If a white space is accidentally added to a repository name in a repository config list, this repository is not synced and also no error is shown. As URLs do not end with white spaces, these could be trimmed automatically to avoid mistakes. In belows case, REPO2 would not be synced cause of the white space at its end.
jobs:
sync_labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: micnncim/[email protected]
with:
manifest: .github/sync_labels.yml
prune: false
repository: |
ORG/REPO1
ORG/REPO2
ORG/REPO3
token: ${{ secrets.PAT}}
An import statement would enhance our ability to share configs across repos. Common fields needed by all repos (such as Type: bug) could be placed in a common config file. Then, each repo has its own config file with its unique labels, and the common ones get imported. For example:
# common.yaml
- name: "Type: bug"
description: Something isn't working
color: d73a4a
# repo1.yaml
- import: common.yaml
- name: "Platform: iOS"
description: Issues specific to iOS
color: d73a4a
In many case I want to sync labels on multiple repositories.
No I can set repository for action, but only one.
My proposition to support syntax like:
- uses: micnncim/action-label-syncer@v1
with:
repository: |
myother/repository,
myother/second-repository;
myother/next-repository
we can split repositories name by new line, comma, semicolon
Dogfooding.
No updates in ~3 years. No response to dependabot PRs.
I think this code has been abandoned.
Thank you for building this action. It's been really great to work with.
There's a small bug due to Github limits. As described, if I create a label with a long description, the action will inform me that everything is working, but Github will not create the label.
Below is an example label and output.
- name: "Status: Author Working"
description: >
The author is working. If others may still review, this label may be used
at same time as the "Ready for Review" label.
color: FFBF00
I've modified the output below to improve readability.
label: {
Name:Status: Author Working
Description:
The author is working. If others may still review, this label may
be used at same time as the "Ready for Review" label.
Color:FFBF00
}
created on: jambonrose/architecture.andrewsforge.com
When I check the list of labels, the label is missing. If I shorten the description to be equal to or less than 100 characters, then the label is created successfully.
I propose that the action explicitly warns people if the label creation step has failed. Including the reason it failed would also be quite helpful.
Through experimentation I have gotten the label sync to work with applying labels to a destination repo from a central repository. Is it possible to use multiple repositories as input to sync labels across multiple repositories at once?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.