From a60a7eefa59d2c43e240527db3412ccfa36ee4a2 Mon Sep 17 00:00:00 2001 From: Shumpei Wakabayashi <42209144+shmpwk@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:30:44 +0900 Subject: [PATCH] ci: add comment-on-pr (#805) --- .github/workflows/comment-on-pr.yaml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/comment-on-pr.yaml diff --git a/.github/workflows/comment-on-pr.yaml b/.github/workflows/comment-on-pr.yaml new file mode 100644 index 0000000000..9f7022d7b9 --- /dev/null +++ b/.github/workflows/comment-on-pr.yaml @@ -0,0 +1,30 @@ +name: comment-on-pr + +on: + pull_request: + types: + - opened + branches: + - beta/v0.[0-9]+.[0-9]+.[0-9]+ + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Create comments + run: | + cat << 'EOF' > comments + ### betaブランチへマージする際のガイドライン + 通常は`Squash and merge`を使用してください。 + ただし、cherry-pickで複数の変更を取り込むときには、変更履歴を残すために`Create a merge commit`を使用してください。 + + ### Merging guidelines for the beta branch + Please use `Squash and merge` as the default. + However, when incorporating multiple changes with cherry-pick, use a `Create a merge commit` to preserve the changes in the history. + EOF + + - name: Post comments + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + URL: ${{ github.event.pull_request.html_url }} + run: gh pr comment -F ./comments "${URL}"