Skip to content
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

ci: request-ciラベルが必要なことを明示するように #218

Merged
merged 2 commits into from
Nov 16, 2023
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/nodejs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,33 @@ jobs:
git status
git diff --exit-code || (echo "Git status is not clean." && exit 1)

comment:
name: Comment
runs-on: ubuntu-latest

if: ${{
github.event_name == 'pull_request_target' &&
github.event.action == 'opened' &&
github.event.pull_request.head.repo.fork == true
}}

steps:
- name: Create PR comment
run: |
cat << EOF > comment.md
# ⚠️ CIの実行には \`🚀request-ci\` ラベルが必要です

このリポジトリはフォークされたリポジトリです。
セキュリティ上の理由から、フォークされたリポジトリからのCI実行は自動的に行われません。

CI実行をリクエストするには、このプルリクエストに \`🚀request-ci\` ラベルを追加してください。
(ラベルを追加できるのは一部のメンバーのみです)
EOF

gh pr comment ${{ github.event.number }} -R ${{ github.repository }} -F comment.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

finished-node-ci:
name: Check finished Node CI
runs-on: ubuntu-latest
Expand Down