Giter VIP home page Giter VIP logo

action-label-syncer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

action-label-syncer's Issues

Fails silently

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.

Clarify label sync behavior

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:

  • If a label color changes, the same label is updated with the new color
  • If a label name changes, the previous label is deleted. All issues and PRs that were previously labeled with this label are now unlabeled.

Is this correct?

I'm happy to submit a PR to update the README with this info.

Sync labels from organization settings

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?

Don't delete unmanaged labels

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.

Allow label renaming

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:

  • Create a new label type: bug if no label named either type: bug or bug exists, or
  • Rename an existing label bug to be type: bug

This would make it much easier to make a set of existing repositories consistent.

Label sync job completes, but does not update or change labels

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.

Example running the workflow:
Screenshot 2023-04-11 at 8 11 47 AM

Example of old labels:
Screenshot 2023-04-11 at 8 12 00 AM

Here is my .labels file which triggers the build:

Screenshot 2023-04-11 at 8 12 10 AM

Any ideas why its failing? Did GitHub change something?

Option to exclude labels from syncing

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 ;-)

E.g.
image

Allow regex in repository list

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 }}

trim whitespaces from elements of repository list

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}}

Import statements

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

Sync labels on multiple repositories at once

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

Support for GitHub Enterprise Server

Background

  • My company is using GitHub Enterprise Server instead of github.com.
  • It doesn't work! No changes after running this action.
    • I think this problem was caused by the host of GitHub API.
  • Is there any plan to support GitHub Enterprise Server?

abandoned?

No updates in ~3 years. No response to dependabot PRs.

I think this code has been abandoned.

Labels with long descriptions fail to create silently.

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.

Multiple Repositories to Apply Labels To

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.