Skip to content

Fix: Separate release and fast-forward workflows #118#196

Merged
github-actions[bot] merged 1 commit intomainfrom
separated-workflow
Apr 22, 2025
Merged

Fix: Separate release and fast-forward workflows #118#196
github-actions[bot] merged 1 commit intomainfrom
separated-workflow

Conversation

@black7375
Copy link
Contributor

@black7375 black7375 commented Apr 22, 2025

Description

Related Issue

Summary by CodeRabbit

  • Chores
    • Simplified the fast-forward workflow to focus solely on fast-forward merges triggered by issue comments.
    • Removed conditional checks and automated release steps from the fast-forward workflow.
    • Added a new release workflow that automates package publishing and release creation on pushes to the main branch.

Additional context

Checklist

@changeset-bot
Copy link

changeset-bot bot commented Apr 22, 2025

⚠️ No Changeset found

Latest commit: b89c106

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Apr 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update restructures the GitHub Actions workflows by separating the release process from the fast-forward process. The .github/workflows/fast-forward.yml workflow is simplified: logic related to checking the pull request base branch, merge status, and conditional outputs is removed, as is the entire release job. A new .github/workflows/release.yml workflow is added, which handles releases independently, triggered by pushes to the main branch. This new workflow checks out the repository, sets up Node, runs changesets for versioning and publishing, and provides debugging logs on failure.

Changes

File(s) Change Summary
.github/workflows/fast-forward.yml Removed the release job, outputs (should_run, head_sha), and the check_branch step; renamed workflow.
.github/workflows/release.yml Added a new workflow for releases, triggered on main branch pushes, with steps for checkout, setup, and publish.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub Actions
    participant Fast-Forward Workflow
    participant Release Workflow

    User->>GitHub Actions: Comment "/fast-forward" on PR
    GitHub Actions->>Fast-Forward Workflow: Trigger workflow
    Fast-Forward Workflow->>GitHub Actions: Run fast-forward action

    User->>GitHub Actions: Push to main branch
    GitHub Actions->>Release Workflow: Trigger workflow
    Release Workflow->>GitHub Actions: Checkout, setup, run changesets, publish
Loading

Possibly related PRs

Suggested labels

bug

Poem

The workflows split, a tidy feat,
Fast-forward runs on nimble feet.
Release now waits for main’s new song,
Publishing packages where they belong.
Simpler scripts, less tangled thread—
This rabbit hops ahead! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01ad0e0 and b89c106.

📒 Files selected for processing (2)
  • .github/workflows/fast-forward.yml (2 hunks)
  • .github/workflows/release.yml (1 hunks)

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Contributor

Triggered from #196 by @​black7375.

Checking if we can fast forward main (98a9c93) to separated-workflow (01ad0e0).

Target branch (main):

commit 98a9c9335f84407717cd5fd7d62ce6c6070af284 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Wed Apr 23 02:42:15 2025 +0900

    Fix: CSS - Work comma selector with nested selectors

Pull request (separated-workflow):

commit 01ad0e014496d382442c9c5a814f1812caf18537 (pull_request/separated-workflow)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Wed Apr 23 02:55:22 2025 +0900

    Fix: Separate release and fast-forward workflows #118

It is possible to fast forward main (98a9c93) to separated-workflow (01ad0e0). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to separated-workflow.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
.github/workflows/fast-forward.yml (2)

7-9: Unify comment-filtering logic
You’re using both a job-level if: and a step with regex to gate execution. Consider consolidating into one location (either the job-level if or the check_comment step) to reduce duplication.


29-38: Add concurrency to avoid overlapping runs
To prevent multiple fast‑forward jobs from queuing on the same PR, you can introduce a concurrency key under this job. For example:

 jobs:
   fast-forward:
     runs-on: ubuntu-latest
+    concurrency:
+      group: fast-forward-${{ github.event.issue.number }}
+      cancel-in-progress: true
.github/workflows/release.yml (2)

12-18: Restrict permissions to principle of least privilege
You’ve granted broad write scopes (issues, pull-requests, statuses). Verify if issues: write is needed—changesets usually only require contents, packages, and statuses.


42-50: Consider uploading logs as artifacts on failure
Printing logs to console can be noisy. You might use actions/upload-artifact to collect the npm logs for post-mortem. For example:

-      - name: Show log on failure
+      - name: Upload npm logs on failure
         if: failure()
-        run: |
-          cd /home/runner/.npm/_logs/ || exit
-          for file in *; do
-            echo "=== File: $file ==="
-            cat "$file"
-            echo -e "\n\n"
-          done
+        uses: actions/upload-artifact@v3
+        with:
+          name: npm-logs
+          path: /home/runner/.npm/_logs
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98a9c93 and 01ad0e0.

📒 Files selected for processing (2)
  • .github/workflows/fast-forward.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
🔇 Additional comments (6)
.github/workflows/fast-forward.yml (2)

1-4: Approve workflow rename and trigger
Renaming to “fast-forward” and restricting the event to pull request comments containing /fast-forward is clear and focused.


18-27: Boundary-safe regex check is solid
The regex correctly matches /fast-forward as a standalone token and prevents false positives. Great use of word‑boundary logic.

.github/workflows/release.yml (4)

1-5: Approve release workflow trigger
Triggering this workflow on push to main cleanly decouples release automation from fast-forward logic.


20-24: Checkout step with full history is correct
Using fetch-depth: 0 ensures tags and full history are available for versioning. This aligns with best practices for releases.


25-27: Verify custom node-setup action
Ensure that ./.github/actions/node-setup exists and properly installs/caches the desired Node versions.


28-36: Validate changesets commands
Confirm that your yarn run publish and yarn run changeset:version scripts are defined in package.json. Mismatches here will cause silent failures in versioning or publishing.

@black7375 black7375 force-pushed the separated-workflow branch from 01ad0e0 to b89c106 Compare April 22, 2025 18:03
@github-actions
Copy link
Contributor

Triggered from #196 by @​black7375.

Checking if we can fast forward main (98a9c93) to separated-workflow (b89c106).

Target branch (main):

commit 98a9c9335f84407717cd5fd7d62ce6c6070af284 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Wed Apr 23 02:42:15 2025 +0900

    Fix: CSS - Work comma selector with nested selectors

Pull request (separated-workflow):

commit b89c1066281e6547972d25dfdf6591bcdf7e9df4 (pull_request/separated-workflow)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Wed Apr 23 03:03:02 2025 +0900

    Fix: Separate release and fast-forward workflows #118

It is possible to fast forward main (98a9c93) to separated-workflow (b89c106). If you have write access to the target repository, you can add a comment with /fast-forward to fast forward main to separated-workflow.

@black7375
Copy link
Contributor Author

/fast-forward

@github-actions
Copy link
Contributor

Triggered from #196 (comment) by @​black7375.

Trying to fast forward main (98a9c93) to separated-workflow (b89c106).

Target branch (main):

commit 98a9c9335f84407717cd5fd7d62ce6c6070af284 (HEAD -> main, origin/main)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Wed Apr 23 02:42:15 2025 +0900

    Fix: CSS - Work comma selector with nested selectors

Pull request (separated-workflow):

commit b89c1066281e6547972d25dfdf6591bcdf7e9df4 (pull_request/separated-workflow)
Author: alstjr7375 <alstjr7375@daum.net>
Date:   Wed Apr 23 03:03:02 2025 +0900

    Fix: Separate release and fast-forward workflows #118

Fast forwarding main (98a9c93) to separated-workflow (b89c106).

$ git push origin b89c1066281e6547972d25dfdf6591bcdf7e9df4:main
To https://github.com/mincho-js/mincho.git
   98a9c93..b89c106  b89c1066281e6547972d25dfdf6591bcdf7e9df4 -> main

@github-actions github-actions bot merged commit b89c106 into main Apr 22, 2025
9 checks passed
@github-actions github-actions bot deleted the separated-workflow branch April 22, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant