Skip to content

Add workflow to auto-create PR on upstream Misskey release#3

Merged
akku1139 merged 15 commits into
developfrom
copilot/create-pr-on-upstream-release
Mar 26, 2026
Merged

Add workflow to auto-create PR on upstream Misskey release#3
akku1139 merged 15 commits into
developfrom
copilot/create-pr-on-upstream-release

Conversation

Copilot AI commented Mar 25, 2026

Copy link
Copy Markdown

What

Adds .github/workflows/upstream-release-sync.yml — a scheduled GitHub Actions workflow that watches misskey-dev/misskey for new releases and automatically opens a PR to merge the upstream tag into develop.

Flow:

  • Runs hourly (+ workflow_dispatch)
  • Fetches the latest release tag from misskey-dev/misskey
  • Checks for an existing upstream/<tag> branch — exits early if found (idempotent)
  • Fetches the tag from upstream, creates and pushes upstream/<tag> branch
  • Opens a PR against develop with the upstream release notes as the body; falls back to a plain description if notes are empty

Why

Upstream releases were tracked manually. Automating this ensures eveskey stays in sync with misskey-dev/misskey without human polling.

Additional info (optional)

The idempotency check uses git ls-remote on the branch name, so re-running the workflow against an already-synced release is a no-op. An explicit tag-existence check after git fetch surfaces clear error messages if the fetch silently fails.

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests
Original prompt

This section details on the original issue you should resolve

<issue_title>アップストリームでリリースが出たら自動でPRを作成するようにしたい</issue_title>
<issue_description>アップストリームでリリースが出たら自動でPRを作成するようにしたい。</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: techfish-11 <135989741+techfish-11@users.noreply.github.com>
Agent-Logs-Url: https://github.com/evex-dev/eveskey/sessions/68630c3d-b655-4a3d-9473-8b32fa6e642a
Copilot AI changed the title [WIP] Add automatic PR creation on upstream release Add workflow to auto-create PR on upstream Misskey release Mar 25, 2026
Copilot AI requested a review from techfish-11 March 25, 2026 15:30
@techfish-11
techfish-11 marked this pull request as ready for review March 25, 2026 15:33
Copilot AI review requested due to automatic review settings March 25, 2026 15:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an automated GitHub Actions workflow to keep this fork in sync with upstream Misskey releases by creating PRs that merge upstream release tags into develop.

Changes:

  • Introduces a scheduled + manual-dispatch workflow to detect the latest upstream release tag.
  • Creates/pushes an upstream/<tag> branch from the upstream tag (idempotent if branch already exists).
  • Opens a PR to develop using upstream release notes as the PR body (with fallback text).

Comment thread .github/workflows/upstream-release-sync.yml Outdated
Comment thread .github/workflows/upstream-release-sync.yml Outdated
Comment thread .github/workflows/upstream-release-sync.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@techfish-11 techfish-11 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多分いいんじゃね知らんけど

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@techfish-11
techfish-11 requested a review from akku1139 March 25, 2026 15:43
Comment thread .github/workflows/upstream-release-sync.yml
Comment thread .github/workflows/upstream-release-sync.yml Outdated
@akku1139

Copy link
Copy Markdown
Member

@copilot plz fix

@akku1139

Copy link
Copy Markdown
Member

コンフリクト起きなかったらマージしてpushまでしちゃえば? (雑)

@akku1139

akku1139 commented Mar 25, 2026

Copy link
Copy Markdown
Member

改善案: (done)
gh pr list --head upstream/ブランチ でチェックして、
プルリクがマージされてからブランチが削除されても大丈夫にする

@akku1139

Copy link
Copy Markdown
Member

もしかすると --state all をやめて、mergedに限定した方がいいかも

#3 (comment)

@akku1139

Copy link
Copy Markdown
Member

良さそう

@akku1139
akku1139 self-requested a review March 25, 2026 17:41
@akku1139
akku1139 requested a review from techfish-11 March 25, 2026 17:42
@akku1139

akku1139 commented Mar 25, 2026

Copy link
Copy Markdown
Member

.github/workflows/* に変更があった場合、権限不足で落ちる問題がある
これを解消するなら akku1139/viteplus-ja@6e7e6b7

  1. ssh-keygen
  2. Actions Secretの SYNC_PRIVATE_KEY に秘密鍵を置く
  3. Deploy keysに公開鍵を登録
  4. workflowでそれを使うようにする

もしくは、GitHub Appsを使う

(done)

@akku1139

Copy link
Copy Markdown
Member

https://github.com/misskey-dev/misskey/commits/develop/.github/workflows

結構な頻度で更新されてるので、回避策が必要

@akku1139

Copy link
Copy Markdown
Member

反応が無いのでマージしちゃう

@akku1139
akku1139 merged commit a10108a into develop Mar 26, 2026
6 checks passed
@akku1139
akku1139 deleted the copilot/create-pr-on-upstream-release branch March 26, 2026 04:42
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.

アップストリームでリリースが出たら自動でPRを作成するようにしたい

4 participants