Skip to content

[All] ci: PR, Issue テンプレートとラベル自動付与の仕組みを追加 #14

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

Merged
merged 3 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/staff-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: FlutterKaigi スタッフのタスク
description: FlutterKaigi スタッフのタスクを作成する
title: "[Staff] "
labels: ["contributor/internal"]
body:
- type: dropdown
id: team
attributes:
label: 担当チーム
description: このタスクを担当するチームを選択してください。
multiple: false
options:
- "App"
- "Website"
- "Infra"
validations:
required: true
- type: textarea
id: summary
attributes:
label: 概要
description: このタスクの目的や背景について簡潔に記述してください。
validations:
required: false
- type: textarea
id: references
attributes:
label: 参考文献
description: このタスクに関連する参考文献やリソースを記載してください。
validations:
required: false
36 changes: 36 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Issue

Closes #{issue_number}

## 概要

<!--
必ず書いてください。
やったことをわかりやすく短く書いてください。
-->

## 詳細

<!--
可能であれば、変更した内容と変更した理由や背景を書いてください。
-->

## 画像・動画

<!--
見た目の変更があれば、画像や動画を添付してください。

<img src="" width="300" />
<video src="" width="300" >
-->

| Before | After | Design |
|-|-|-|
| | | |

## その他

<!--
参考にしたものがあれば書いてください。
また、注意することなどあればあわせて書いてください。
-->
12 changes: 12 additions & 0 deletions .github/issue-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
policy:
- template: ["staff-task.yaml"]
section:
- id: ["team"]
block-list: []
label:
- name: "team/app"
keys: ["App"]
- name: "team/website"
keys: ["Website"]
- name: "team/infra"
keys: ["Infra"]
38 changes: 38 additions & 0 deletions .github/workflows/Issue-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Issue labeler"

on:
issues:
types:
- opened

jobs:
label-component:
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
issues: write
contents: read
strategy:
matrix:
template:
- staff-task.yaml
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# https://github.com/stefanbuck/github-issue-parser
- name: Parse issue form
uses: stefanbuck/github-issue-parser@2d2ff50d4aae06ab58d26bf59468d98086605f11 # v3.2.1
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}

# https://github.com/redhat-plumbers-in-action/advanced-issue-labeler
- name: Set labels based on severity field
uses: redhat-plumbers-in-action/advanced-issue-labeler@d498805e5c7c0658e336948b3363480bcfd68da6 # v3.2.0
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
template: ${{ matrix.template }}
config-path: .github/issue-labeler.yaml
token: ${{ secrets.GITHUB_TOKEN }}