Skip to content

Commit

Permalink
Merge pull request #102 from 9renpoto/feature/labels
Browse files Browse the repository at this point in the history
feat: sync labels
  • Loading branch information
9renpoto authored Dec 31, 2023
2 parents d4e4044 + 30fda95 commit 14c092a
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,23 @@ changelog:
authors:
- octocat
categories:
- title: ":boom: Type: Breaking Change"
labels:
- "Type: Breaking Change"
- title: ":bug: Type: Bug"
labels:
- "Type: Bug"
- "bug"
- title: ":house: Refactoring"
labels:
- "Type: Refactoring"
- title: ":memo: Documentation"
labels:
- "Type: Documentation"
- "documentation"
- title: ":rocket: Type: Feature"
labels:
- "Type: Feature"
- "enhancement"
- title: Other Changes
labels:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/export-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Export label

on:
label:
types: [created, edited, deleted]
workflow_dispatch:

permissions:
issues: read
contents: write
pull-requests: write

jobs:
export_labels:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: EndBug/export-label-config@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

create_pull_request:
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- export_labels
steps:
- uses: actions/checkout@v3
with:
ref: main
- uses: actions/download-artifact@v3
with:
name: Label config
- run: cp labels.yaml .github/labels.yaml
- uses: peter-evans/create-pull-request@v5
with:
commit-message: Update labels
delete-branch: true
title: Update labels
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
branch: create-pull-request/patch-export-label
add-paths: |
.github/labels.yaml
4 changes: 2 additions & 2 deletions .github/workflows/secretlint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Secretlint
on: [push, pull_request]
on: push
permissions:
contents: read
jobs:
test:
name: "Secretlint"
runs-on: ubuntu-latest
container: secretlint/secretlint:v8.0.0
container: secretlint/secretlint:v8.1.0
steps:
- name: checkout
uses: actions/checkout@v4
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Sync labels

on:
push:
branches:
- main
paths:
- ".github/labels.yaml"
workflow_dispatch:

permissions:
issues: write
contents: read

jobs:
label_sync:
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v3
- uses: EndBug/label-sync@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: .github/labels.yaml
delete-other-labels: true

0 comments on commit 14c092a

Please sign in to comment.