ghaction-github-labeler icon indicating copy to clipboard operation
ghaction-github-labeler copied to clipboard

Support `.github` repo `label.yml` file

Open jetersen opened this issue 6 years ago • 3 comments

Would be great to support the .github repo style of deep merging the label.yml

So you could have default labels from organization. 👍

jetersen avatar Oct 21 '19 09:10 jetersen

Hi @casz, thanks for your suggestion!

I had thought about integrating this feature but for the moment the scope of a GITHUB_TOKEN is not expanded to the org (yet?). The only way would be to use a GitHub PAT.

Considering this I think we should modify the YAML config to something like:

repos:
  - "." # means current repo
  - "myorgname/*"
  - "myusername/*"
  - "myusername/arepo"
labels:
  - name: mylabel
    color: "000000"
  - ...

crazy-max avatar Oct 21 '19 13:10 crazy-max

I could perhaps provide my own GitHub token that has the necessary access ? 😄

jetersen avatar Oct 21 '19 13:10 jetersen

By definition the .github repo has to be public at least according to GitHub docs that would mean the default token should suffice.

https://docs.github.com/en/free-pro-team@latest/github/building-a-strong-community/creating-a-default-community-health-file#creating-a-repository-for-default-files

You can add default community health files to the root of a public repository called .github that is owned by an organization or user account.

Make sure the repository status is set to Public (a repository for default files cannot be private).

jetersen avatar Dec 30 '20 11:12 jetersen