micnncim / action-label-syncer

GitHub Action to sync GitHub labels in the declarative way

Home Page:https://github.com/marketplace/actions/label-syncer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow regex in repository list

vcharan17 opened this issue · comments

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/action-label-syncer@v1.3.0
  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/action-label-syncer@v1.3.0
  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 }}