Skip to content
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
34 changes: 17 additions & 17 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# name: Auto Author Assign
#
# on:
# pull_request_target:
# types:
# - opened
# - reopened
#
# permissions:
# pull-requests: write
#
# jobs:
# assign-author:
# name: Assign PR author as assignee
# runs-on: ubuntu-slim
# steps:
# - uses: toshimaru/auto-author-assign@v3.0.1
name: Auto Author Assign

on:
pull_request_target:
types:
- opened
- reopened

permissions:
pull-requests: write

jobs:
assign-author:
name: Assign PR author as assignee
runs-on: ubuntu-slim
Comment thread
Yusuke4869 marked this conversation as resolved.
steps:
- uses: toshimaru/auto-author-assign@v3.0.1
Comment thread
Yusuke4869 marked this conversation as resolved.
Comment thread
Yusuke4869 marked this conversation as resolved.
85 changes: 0 additions & 85 deletions .github/workflows/ci.yml

This file was deleted.

156 changes: 78 additions & 78 deletions .github/workflows/semantic-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,78 @@
# name: Semantic PR Title
#
# on:
# pull_request_target:
# types:
# - opened
# - reopened
# - edited
# - synchronize
#
# permissions:
# statuses: write
# pull-requests: write
#
# jobs:
# lint:
# name: Validate PR title
# runs-on: ubuntu-slim
# steps:
# - name: Lint PR title
# id: lint_pr_title
# uses: amannn/action-semantic-pull-request@v6
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#
# with:
# disallowScopes: |
# .*[A-Z].*
# subjectPattern: ^(?![A-Z]).+$
# subjectPatternError: |
# Pull Request のタイトル "{title}" に含まれる subject "{subject}" がルールに一致しませんでした。
# subject は大文字で始まらないようにしてください。
# # 主にプライベートリポジトリ向けの `[WIP]` 接頭辞対応
# # これを有効にする場合、statuses: write 権限が必要
# wip: true
#
# - name: Comment on failure
# if: always() && (steps.lint_pr_title.outputs.error_message != null)
# uses: marocchino/sticky-pull-request-comment@v2
# with:
# header: semantic-pr-title
# message: |
# Pull Request のタイトルは [Conventional Commits](https://www.conventionalcommits.org/ja/) に従う必要があります。
# 提案されたタイトルは調整が必要なようです。
#
# 以下のフォーマットに従ってください。
#
# ```
# feat(api): add user endpoint
# ^ ^ ^
# │ │ └── subject
# │ └──────── scope(任意)
# └───────────── type
# ```
#
# > [!NOTE]
# > 先頭に変更の種類 `type` を付け、その後に短く変更の内容 `subject` を書きます。
# > `scope` は任意ですが、書く場合は `(scope)` を `type` の後に付けてください。
# > なお、`scope` に大文字を使用することはできず、`subject` を大文字で始めることはできません。
#
# > [!NOTE]
# > Revert PR の場合、タイトルは `revert: <original commit>` の形式にする必要があります。
#
# > [!TIP]
# > ドラフト(Work in Progress)PR の場合、タイトルの先頭に `[WIP]` を付けることができます。
# > なお、マージの際にはこの `[WIP]` を削除してください。
#
# 詳細(エラー):
# ```
# ${{ steps.lint_pr_title.outputs.error_message }}
# ```
#
# - name: Clear comment on success
# if: always() && (steps.lint_pr_title.outputs.error_message == null)
# uses: marocchino/sticky-pull-request-comment@v2
# with:
# header: semantic-pr-title
# delete: true
name: Semantic PR Title

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

permissions:
statuses: write
pull-requests: write

jobs:
lint:
name: Validate PR title
runs-on: ubuntu-slim
Comment thread
Yusuke4869 marked this conversation as resolved.
steps:
- name: Lint PR title
id: lint_pr_title
uses: amannn/action-semantic-pull-request@v6
Comment thread
Yusuke4869 marked this conversation as resolved.
env:
Comment thread
Yusuke4869 marked this conversation as resolved.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

with:
disallowScopes: |
.*[A-Z].*
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: |
Pull Request のタイトル "{title}" に含まれる subject "{subject}" がルールに一致しませんでした。
subject は大文字で始まらないようにしてください。
# 主にプライベートリポジトリ向けの `[WIP]` 接頭辞対応
# これを有効にする場合、statuses: write 権限が必要
wip: true

- name: Comment on failure
if: always() && (steps.lint_pr_title.outputs.error_message != null)
uses: marocchino/sticky-pull-request-comment@v2
with:
header: semantic-pr-title
message: |
Pull Request のタイトルは [Conventional Commits](https://www.conventionalcommits.org/ja/) に従う必要があります。
提案されたタイトルは調整が必要なようです。

以下のフォーマットに従ってください。

```
feat(api): add user endpoint
^ ^ ^
│ │ └── subject
│ └──────── scope(任意)
└───────────── type
```

> [!NOTE]
> 先頭に変更の種類 `type` を付け、その後に短く変更の内容 `subject` を書きます。
> `scope` は任意ですが、書く場合は `(scope)` を `type` の後に付けてください。
> なお、`scope` に大文字を使用することはできず、`subject` を大文字で始めることはできません。

> [!NOTE]
> Revert PR の場合、タイトルは `revert: <original commit>` の形式にする必要があります。

> [!TIP]
> ドラフト(Work in Progress)PR の場合、タイトルの先頭に `[WIP]` を付けることができます。
> なお、マージの際にはこの `[WIP]` を削除してください。

詳細(エラー):
```
${{ steps.lint_pr_title.outputs.error_message }}
```

- name: Clear comment on success
if: always() && (steps.lint_pr_title.outputs.error_message == null)
uses: marocchino/sticky-pull-request-comment@v2
with:
header: semantic-pr-title
delete: true