-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature Request: Can this be turned into a GitHub App? #4
Comments
Yes! I love that idea! π |
π @Mariatta |
π€ Mariatta was mentioned, but she's out of open source until end of September 2019. Hopefully someone else can look into this in the meantime. |
Hi @michaeljoseph! π Mariatta and I chatted about how the GitHub app would work offline and we came up with the following design. π Adding the appWhen the app is added to a GitHub repo it will check for a labels file on the repo's default branch.
GitHub label eventWhen a user modifies a GitHub label of a repo, the labels app will react to event and use GitHub push eventWhen a users pushes commits to the repo's default branch, the labels app will react to the event and check whether the commit modifies the labels file. If the file was modified, the labels app will use GitHub pull request eventWhen a new pull-request is created, the labels app will react to the event and check whether it modifies the labels file. If the file was modified, the labels app use I think it would be really cool if we could implement this idea as a GitHub Action! π€ I'm curious to hear what you think about our design! |
Other use cases(notes from @Mariatta and my chat at PyCon DE)
|
π€ Mariatta was mentioned, but she's out of open source until end of September 2019. Hopefully someone else can look into this in the meantime. |
What do you think @michaeljoseph? π |
I just noticed that there is a GitHub Action based on |
@jean I created it. You can define labels in on:
push:
branches:
- master
name: labels
jobs:
labels:
name: labels
runs-on: ubuntu-latest
steps:
- name: sync labels
uses: tprasadtp/labels@master # Prefer using a tagged version!!!
with:
token: ${{ secrets.GITHUB_TOKEN }} It will sync the labels, for the repo in which actions is being executed. To manage labels for multiple repos in a single workflow, you have to use builds matrix and a Personal Access Token. jobs:
labels:
name: labels
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
repo: [ "repo1", "repo2", "repo3", "repo4"]
steps:
- uses: actions/checkout@v2
- name: sync labels
uses: tprasadtp/labels@master # Prefer using a tagged version!!!
with:
file: .github/labels.toml
repo: ${{ matrix.repo }}
token: ${{ secrets.PAT }} Note: It only works on x86_64 and Linux. |
I've setup a GitHub action in my projects to run name: Sync Github labels
on:
push:
branches:
- main
paths:
- ".github/**"
jobs:
labels:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install labels
run: pip install labels
- name: Sync config with Github
run: labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml I recently managed to tweak it with the right permissions, so it works with the native I've put together pull request #36 to simplify the user-land setup a bit and document its usage. Suggestions welcome! |
Thanks for this project, I found it really useful, but I'm uh... lazy.. when it comes to command line π₯ πββοΈ
I think it would be great for this to exists as a GitHub App, and easily installed to any repo we like.
I'll be interested to help build such app :)
The text was updated successfully, but these errors were encountered: