Skip to content

ci(ci): GitHub Actions からのプルリクエスト作成を許可する - #243

Merged
gurezo merged 3 commits into
mainfrom
ci/allow-actions-create-pull-requests
Aug 16, 2026
Merged

gurezo merged 3 commits into
mainfrom
ci/allow-actions-create-pull-requests

Conversation

@gurezo

@gurezo gurezo commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

sync-example-upstreams が Create Pull Request ステップで GitHub Actions is not permitted to create or approve pull requests により失敗していた問題を修正します。workflow の YAML 権限は既に足りていたため、任意の PAT_TOKEN フォールバックを追加し、自動 PR 作成に必要なリポジトリ設定を文書化しました。

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Chore (build/test/ci)
  • Breaking change

Related issues

What changed?

  • sync-example-upstreams / sync-devices / refresh-devices の PR 作成・auto-merge に token: ${{ secrets.PAT_TOKEN || github.token }} を追加
  • 自動 PR 作成に必要なリポジトリ設定(Allow GitHub Actions to create and approve pull requests)と任意シークレット PAT_TOKEN を文書化

API / Compatibility

  • Public API changes (export / function signature / behavior)
    • Details:
  • This change is backward compatible
  • This change introduces a breaking change
    • Migration notes:

How to test

  1. リポジトリ設定 Settings → Actions → General → Workflow permissions で Allow GitHub Actions to create and approve pull requests が有効であることを確認する
  2. (任意)repo スコープの PAT をシークレット PAT_TOKEN として登録する。未設定でも GITHUB_TOKEN にフォールバックする
  3. Actions から Sync example upstreams を workflow_dispatch で再実行し、Create Pull Request ステップが成功することを確認する

Environment (if relevant)

  • Browser: N/A
  • OS: ubuntu-latest
  • Node version: 24
  • pnpm version: pnpm/action-setup@v4

Checklist

  • I ran tests locally (if available)
  • I updated docs/README if needed
  • I considered error handling where relevant

Made with Cursor

gurezo and others added 3 commits August 16, 2026 11:09
Allow PAT_TOKEN to create and auto-merge PRs when GITHUB_TOKEN is blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
Apply the same PAT_TOKEN fallback to sync-devices and refresh-devices.

Co-authored-by: Cursor <cursoragent@cursor.com>
Explain the repo setting and optional PAT_TOKEN required to create sync PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gurezo
gurezo merged commit ca8b829 into main Aug 16, 2026
5 checks passed
@gurezo
gurezo deleted the ci/allow-actions-create-pull-requests branch August 16, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant