From 94936ab13eaf10dcf8a33a6ca2d66c88e18ace66 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Wed, 12 Nov 2025 16:08:50 -1000 Subject: [PATCH 1/3] Simplify PR welcome messages to be more concise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reduced both PR welcome message workflows to single-line summaries: - Removed verbose bullet-point lists and detailed explanations - Kept only essential information: how to trigger full CI - Eliminated redundant information between the two workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/pr-welcome-comment.yml | 18 +----------------- .github/workflows/pr-welcome-message.yml | 16 +--------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/.github/workflows/pr-welcome-comment.yml b/.github/workflows/pr-welcome-comment.yml index ab5652f48b..31a34b8008 100644 --- a/.github/workflows/pr-welcome-comment.yml +++ b/.github/workflows/pr-welcome-comment.yml @@ -19,20 +19,4 @@ jobs: body: | 👋 Thanks for opening this PR! - ### 🚀 Running Full CI Suite - - By default, PRs run a subset of CI jobs for faster feedback (latest Ruby/Node versions only). - - To run the **complete CI suite** including all dependency combinations and skipped jobs, comment: - - ``` - /run-skipped-ci - ``` - - This will trigger: - - ✅ Minimum supported versions (Ruby 3.2, Node 20) - - ✅ All example app tests - - ✅ Pro package integration tests - - ✅ All test matrices - - The full CI suite takes longer but ensures compatibility across all supported versions before merging. + **Need full CI coverage?** Comment `/run-skipped-ci` to test against minimum supported versions (Ruby 3.2, Node 20) and all test matrices. diff --git a/.github/workflows/pr-welcome-message.yml b/.github/workflows/pr-welcome-message.yml index 4d00fca5cb..d59fbcbce6 100644 --- a/.github/workflows/pr-welcome-message.yml +++ b/.github/workflows/pr-welcome-message.yml @@ -18,21 +18,7 @@ jobs: const welcomeMessage = [ '👋 **Thanks for your contribution!**', '', - 'This PR will run CI tests based on the files you changed. If some tests are skipped and you want to run the full test suite (including minimum dependency tests), you can use these commands:', - '', - '### CI Control Commands', - '', - '- **`/run-skipped-ci`** - Runs all skipped CI checks and enables full CI mode for this PR', - ' - Adds the `full-ci` label to ensure future commits also run the full test suite', - ' - Useful when you want comprehensive testing across all configurations', - '', - '- **`/stop-run-skipped-ci`** - Disables full CI mode and returns to standard CI', - ' - Removes the `full-ci` label', - ' - Future commits will only run tests for changed files', - '', - '**Note:**', - '- These commands require write access to the repository', - '- The `full-ci` label is preserved on merged PRs as a historical record', + '**Need full CI coverage?** Comment `/run-skipped-ci` to test against minimum supported versions (Ruby 3.2, Node 20) and all test matrices.', '', 'View CI progress in the [Actions tab](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions).' ].join('\n'); From 91b427e8e79ca52e7e02c8871ed38131d0ce20a7 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Wed, 12 Nov 2025 16:29:22 -1000 Subject: [PATCH 2/3] Simplify PR welcome messages to be more concise Remove verbose listings of individual CI checks and workflows in bot comments. Keep essential functionality (full-ci label, triggering) while reducing noise in PR comments. - Delete redundant pr-welcome-comment.yml workflow - Delete redundant pr-welcome-message.yml workflow - Simplify run-skipped-ci.yml to show status without listing checks This makes PR bot messages cleaner and less overwhelming for contributors. --- .github/workflows/pr-welcome-comment.yml | 22 ---------------- .github/workflows/pr-welcome-message.yml | 33 ------------------------ .github/workflows/run-skipped-ci.yml | 11 +++----- 3 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 .github/workflows/pr-welcome-comment.yml delete mode 100644 .github/workflows/pr-welcome-message.yml diff --git a/.github/workflows/pr-welcome-comment.yml b/.github/workflows/pr-welcome-comment.yml deleted file mode 100644 index 31a34b8008..0000000000 --- a/.github/workflows/pr-welcome-comment.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: PR Welcome Comment - -on: - pull_request: - types: [opened] - -jobs: - welcome: - # Skip for bots (dependabot, renovate, etc.) - if: github.event.pull_request.user.type != 'Bot' - runs-on: ubuntu-22.04 - permissions: - pull-requests: write - steps: - - name: Add welcome comment with CI command info - uses: peter-evans/create-or-update-comment@v4 - with: - issue-number: ${{ github.event.pull_request.number }} - body: | - 👋 Thanks for opening this PR! - - **Need full CI coverage?** Comment `/run-skipped-ci` to test against minimum supported versions (Ruby 3.2, Node 20) and all test matrices. diff --git a/.github/workflows/pr-welcome-message.yml b/.github/workflows/pr-welcome-message.yml deleted file mode 100644 index d59fbcbce6..0000000000 --- a/.github/workflows/pr-welcome-message.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: PR Welcome Message - -on: - pull_request: - types: [opened] - -jobs: - welcome: - runs-on: ubuntu-22.04 - permissions: - issues: write - pull-requests: write - steps: - - name: Post welcome message - uses: actions/github-script@v7 - with: - script: | - const welcomeMessage = [ - '👋 **Thanks for your contribution!**', - '', - '**Need full CI coverage?** Comment `/run-skipped-ci` to test against minimum supported versions (Ruby 3.2, Node 20) and all test matrices.', - '', - 'View CI progress in the [Actions tab](${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions).' - ].join('\n'); - - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: welcomeMessage - }); - - console.log('✅ Posted welcome message to PR'); diff --git a/.github/workflows/run-skipped-ci.yml b/.github/workflows/run-skipped-ci.yml index 688c62f111..a23427a1c5 100644 --- a/.github/workflows/run-skipped-ci.yml +++ b/.github/workflows/run-skipped-ci.yml @@ -207,13 +207,10 @@ jobs: status = '✅ **Successfully triggered skipped CI checks**'; } - // List the skipped checks we found - const skippedChecksList = skippedChecks.length > 0 - ? `\n**Skipped checks detected:**\n${skippedChecks.map(c => `- ${c.name} (${c.workflow_name})`).join('\n')}` - : ''; - - const verifiedList = verified.length > 0 ? `\n**Triggered workflows:**\n${verified.map(w => `- ✅ ${w.name}`).join('\n')}` : ''; - const notFoundList = notFound.length > 0 ? `\n\n**Triggered but not yet queued (may still start):**\n${notFound.map(w => `- ⏳ ${w.name}`).join('\n')}` : ''; + // Don't list individual checks - keep it simple + const skippedChecksList = ''; + const verifiedList = ''; + const notFoundList = ''; const failedList = failed.length > 0 ? `\n\n**Failed to trigger:**\n${failed.map(f => `- ❌ ${f.workflow}: ${f.error}`).join('\n')}` : ''; // Add full-ci label only if we actually triggered workflows or if checks are already running From 4934897b428495566401acb471ccd44421585d11 Mon Sep 17 00:00:00 2001 From: Justin Gordon Date: Wed, 12 Nov 2025 16:34:28 -1000 Subject: [PATCH 3/3] Add full-ci label support to all detect-changes workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extended the full-ci label checking mechanism from main.yml to all workflows that use detect-changes pattern. This ensures /run-skipped-ci command works across all CI jobs, not just main tests. Changes: - package-js-tests.yml: Check full-ci label, run Node 20 when label present - lint-js-and-ruby.yml: Check full-ci label before change detection - rspec-package-specs.yml: Check full-ci label, run Ruby 3.2 when label present All workflows now consistently: 1. Check for full-ci label first 2. If present, force all tests to run 3. Otherwise use normal change detection 4. Apply matrix exclude rules based on label presence 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/lint-js-and-ruby.yml | 15 +++++++++++++++ .github/workflows/package-js-tests.yml | 22 ++++++++++++++++++++-- .github/workflows/rspec-package-specs.yml | 23 +++++++++++++++++++++-- 3 files changed, 56 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index a4138195ac..28203f822b 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -23,14 +23,29 @@ jobs: run_ruby_tests: ${{ steps.detect.outputs.run_ruby_tests }} run_dummy_tests: ${{ steps.detect.outputs.run_dummy_tests }} run_generators: ${{ steps.detect.outputs.run_generators }} + has_full_ci_label: ${{ steps.check-label.outputs.result }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 persist-credentials: false + - name: Check for full-ci label + id: check-label + uses: ./.github/actions/check-full-ci-label - name: Detect relevant changes id: detect run: | + # If full-ci label is present, run everything + if [ "${{ steps.check-label.outputs.result }}" = "true" ]; then + echo "run_lint=true" >> "$GITHUB_OUTPUT" + echo "run_js_tests=true" >> "$GITHUB_OUTPUT" + echo "run_ruby_tests=true" >> "$GITHUB_OUTPUT" + echo "run_dummy_tests=true" >> "$GITHUB_OUTPUT" + echo "run_generators=true" >> "$GITHUB_OUTPUT" + echo "docs_only=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + BASE_REF="${{ github.event.pull_request.base.sha || github.event.before || 'origin/master' }}" script/ci-changes-detector "$BASE_REF" shell: bash diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index 73e1628123..0b404fd1b1 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -27,22 +27,37 @@ jobs: run_ruby_tests: ${{ steps.detect.outputs.run_ruby_tests }} run_dummy_tests: ${{ steps.detect.outputs.run_dummy_tests }} run_generators: ${{ steps.detect.outputs.run_generators }} + has_full_ci_label: ${{ steps.check-label.outputs.result }} steps: - uses: actions/checkout@v4 with: # Fetch enough history for change detection (50 commits is usually sufficient for PRs) fetch-depth: 50 persist-credentials: false + - name: Check for full-ci label + id: check-label + uses: ./.github/actions/check-full-ci-label - name: Detect relevant changes id: detect run: | + # If full-ci label is present, run everything + if [ "${{ steps.check-label.outputs.result }}" = "true" ]; then + echo "run_lint=true" >> "$GITHUB_OUTPUT" + echo "run_js_tests=true" >> "$GITHUB_OUTPUT" + echo "run_ruby_tests=true" >> "$GITHUB_OUTPUT" + echo "run_dummy_tests=true" >> "$GITHUB_OUTPUT" + echo "run_generators=true" >> "$GITHUB_OUTPUT" + echo "docs_only=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + BASE_REF="${{ github.event.pull_request.base.sha || github.event.before || 'origin/master' }}" script/ci-changes-detector "$BASE_REF" shell: bash build: needs: detect-changes - # Run on master OR when JS tests needed on PR (but skip Node 20 on PR) + # Run on master OR when JS tests needed on PR if: | (github.ref == 'refs/heads/master' || needs.detect-changes.outputs.run_js_tests == 'true') strategy: @@ -50,8 +65,11 @@ jobs: include: # Always run: Latest Node version (fast feedback on PRs) - node-version: '22' - # Master only: Minimum supported Node version (full coverage) + # Master and full-ci label: Minimum supported Node version (full coverage) - node-version: '20' + exclude: + # Skip minimum dependency matrix on regular PRs (run only on master or with full-ci label) + - node-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && needs.detect-changes.outputs.has_full_ci_label != 'true' && '20' || '' }} runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index cb1c062661..af91bb3ba9 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -27,22 +27,37 @@ jobs: run_ruby_tests: ${{ steps.detect.outputs.run_ruby_tests }} run_dummy_tests: ${{ steps.detect.outputs.run_dummy_tests }} run_generators: ${{ steps.detect.outputs.run_generators }} + has_full_ci_label: ${{ steps.check-label.outputs.result }} steps: - uses: actions/checkout@v4 with: # Fetch enough history for change detection (50 commits is usually sufficient for PRs) fetch-depth: 50 persist-credentials: false + - name: Check for full-ci label + id: check-label + uses: ./.github/actions/check-full-ci-label - name: Detect relevant changes id: detect run: | + # If full-ci label is present, run everything + if [ "${{ steps.check-label.outputs.result }}" = "true" ]; then + echo "run_lint=true" >> "$GITHUB_OUTPUT" + echo "run_js_tests=true" >> "$GITHUB_OUTPUT" + echo "run_ruby_tests=true" >> "$GITHUB_OUTPUT" + echo "run_dummy_tests=true" >> "$GITHUB_OUTPUT" + echo "run_generators=true" >> "$GITHUB_OUTPUT" + echo "docs_only=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + BASE_REF="${{ github.event.pull_request.base.sha || github.event.before || 'origin/master' }}" script/ci-changes-detector "$BASE_REF" shell: bash rspec-package-tests: needs: detect-changes - # Run on master OR when Ruby tests needed on PR (but skip minimum deps on PR) + # Run on master OR when Ruby tests needed on PR if: | (github.ref == 'refs/heads/master' || needs.detect-changes.outputs.run_ruby_tests == 'true') strategy: @@ -52,9 +67,13 @@ jobs: # Always run: Latest versions (fast feedback on PRs) - ruby-version: '3.4' dependency-level: 'latest' - # Master only: Minimum supported versions (full coverage) + # Master and full-ci label: Minimum supported versions (full coverage) - ruby-version: '3.2' dependency-level: 'minimum' + exclude: + # Skip minimum dependency matrix on regular PRs (run only on master or with full-ci label) + - ruby-version: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && needs.detect-changes.outputs.has_full_ci_label != 'true' && '3.2' || '' }} + dependency-level: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' && needs.detect-changes.outputs.has_full_ci_label != 'true' && 'minimum' || '' }} env: BUNDLE_FROZEN: ${{ matrix.dependency-level == 'minimum' && 'false' || 'true' }} runs-on: ubuntu-22.04