Skip to content

Commit

Permalink
migrate label sync to endbug/label-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
reece committed Feb 1, 2024
1 parent 7e600ba commit 280191d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 14 deletions.
8 changes: 5 additions & 3 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# https://raw.githubusercontent.com/EndBug/labels/main/labels.yml

- name: "bug"
color: "d73a4a"
description: "Something isn't working"
Expand Down Expand Up @@ -46,14 +48,14 @@
- name: "stale"
color: "777777"
description: "Issue is stale and subject to automatic closing"
from_name: "Stale"
aliases: ["Stale"]

- name: "stale closed"
color: "444444"
description: "Issue was closed automatically due to inactivity"
from_name: "stale-closed"
aliases: ["stale-closed"]

- name: "won't fix"
color: "ffffff"
description: "This will not be worked on"
from_name: wontfix
aliases: ["wontfix"]
31 changes: 20 additions & 11 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
name: Synchronize labels

name: Sync labels
on:
workflow_dispatch:
workflow_call:
push:
branches:
- 'main'
paths:
- '.github/labels.yml'
- '.github/workflows/labels.yml'

permissions:
issues: write

jobs:
labeler:
labels:
runs-on: ubuntu-latest

steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4
- uses: actions/checkout@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
yaml-file: .github/labels.yml
sparse-checkout: .github/labels.yml

- uses: EndBug/label-sync@v2
with:
config-file: |
https://raw.githubusercontent.com/biocommons/.github/main/.github/labels.yml
.github/labels.yml
delete-other-labels: false
dry-run: true
#token: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions archive/notes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
D=$(ls -1d */.git | cut -d/ -f1 | egrep -v 'biocommons.example|seqrepo-rs')
git-all () { for d in $D; do (set -x; git -C $d "$@"); done }

for d in $D; do \cp -a biocommons.example/.github/ISSUE_TEMPLATE $d/.github/; done
for d in $D; do \cp -a biocommons.example/.github/workflows/labels.yml $d/.github/workflows/; done

git-all add .github/labels.yml .github/workflows/labels.yml
git-all com -m "add standardized github labels and update action" .github/labels.yml .github/workflows/labels.yml
git-all push
https://axolo.co/blog/p/part-3-github-pull-request-template

0 comments on commit 280191d

Please sign in to comment.