Skip to content

fix auto-generated CI rerun#1561

Open
Eraxyso wants to merge 3 commits into
mainfrom
fix/auto-generated-ci-rerun
Open

fix auto-generated CI rerun#1561
Eraxyso wants to merge 3 commits into
mainfrom
fix/auto-generated-ci-rerun

Conversation

@Eraxyso

@Eraxyso Eraxyso commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the auto-generated file commit flow in CI so that the generated commit is followed by a full CI run.

Background

The previous auto-commit used [skip ci], so when GitHub Actions pushed regenerated files back to a PR branch, the follow-up commit did not run the full CI workflow. This could leave the PR without checks for the actual commit that would be merged.

Changes

  • Add workflow_dispatch to the CI workflow.
  • Remove [skip ci] from the generated-files commit message.
  • Dispatch the CI workflow after pushing an auto-generated commit.
  • Add actions: write permission for the generate job so it can trigger the workflow dispatch.
  • Skip downstream jobs in the original run when it has just pushed an auto-generated commit, letting the dispatched run check the updated branch state.

Summary by CodeRabbit

改善

  • Improvements
    • CI/CDワークフローの手動実行機能を追加しました。
    • 自動生成ファイルのコミット時に、不要な重複実行を抑止する処理を実装しました。

Review Change Stack

@Eraxyso Eraxyso requested a review from kaitoyama May 26, 2026 08:40
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Eraxyso, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 21 minutes and 1 second. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 83e5655c-6e8a-418b-9dd5-9cf54ff26621

📥 Commits

Reviewing files that changed from the base of the PR and between fe2f9b3 and 534ba51.

📒 Files selected for processing (1)
  • .github/workflows/main.yml
📝 Walkthrough

Walkthrough

GitHub Actions CI workflowの手動実行トリガーが追加され、自動生成ファイルのコミット検知・自動プッシュ・ワークフロー再実行・後続ジョブスキップ制御が実装されました。generate ジョブに必要な権限を付与し、auto_commit ステップでファイル差分をチェックしてコミット有無を出力、mod ジョブが自動コミット時にスキップされます。

Changes

自動生成ファイルのコミット・再実行・後続ジョブ制御

Layer / File(s) Summary
ワークフロー実行トリガーと権限設定
.github/workflows/main.yml
workflow_dispatch により手動実行が可能になり、generate ジョブに actions:write と contents:write 権限が付与され、出力として committed フラグが関連付けられた。
自動コミット・ワークフロー再実行ロジック
.github/workflows/main.yml
auto_commit ステップは差分がある場合に git add/commit/push を実行し、gh workflow run で同じワークフローを head_ref 指定で再実行し、committed フラグを GITHUB_OUTPUT に出力する。差分がない場合は committed=false を出力する。
後続ジョブのスキップ制御
.github/workflows/main.yml
mod ジョブの実行条件に needs.generate.outputs.generated_commit != 'true' が追加され、自動コミット発生時には mod ジョブの実行が抑止される。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトル「fix auto-generated CI rerun」は、プルリクエストの主要な変更内容である自動生成ファイルのコミット後のCI再実行フローの修正を明確かつ簡潔に要約している。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/auto-generated-ci-rerun

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/main.yml:
- Around line 39-53: The workflow expands `${{ github.head_ref }}` directly into
shell commands (used in `git push origin HEAD:${{ github.head_ref }}` and `gh
workflow run main.yml --ref "${{ github.head_ref }}"`), creating a
command-injection risk; fix it by assigning the template value to a safe
environment variable (e.g., REF) and reference that var in the shell (export or
env: REF: ${{ github.head_ref }}), then use the quoted shell variable (`"$REF"`)
in the `git push` and `gh workflow run` invocations to prevent word-splitting
and injection.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4090e1d1-c164-47d6-9d6b-2b8f8e9e89ff

📥 Commits

Reviewing files that changed from the base of the PR and between 200d0de and fe2f9b3.

📒 Files selected for processing (1)
  • .github/workflows/main.yml

Comment thread .github/workflows/main.yml
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.10%. Comparing base (86eaaca) to head (534ba51).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1561      +/-   ##
==========================================
+ Coverage   64.03%   64.10%   +0.07%     
==========================================
  Files          27       27              
  Lines        4134     4134              
==========================================
+ Hits         2647     2650       +3     
+ Misses       1089     1087       -2     
+ Partials      398      397       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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