Skip to content

Conversation

@jakebayliss
Copy link
Member

Small content changes require users to open GitHub, mark the created PR as Ready, get others to review, wait for builds, etc. We should be able to auto-approve/merge these small PRs.

As per my conversation with Uly, we will start off by auto-approving PR with <= 2 files changed. This allows for a rule and an image for example.

Fixed #3965

Created POC repo to test the auto-merge:
image

Copilot AI review requested due to automatic review settings July 16, 2025 05:35
@jakebayliss jakebayliss requested a review from wicksipedia as a code owner July 16, 2025 05:35

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 16, 2025

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 0.2% 72/36629
🔴 Branches 5.81% 24/413
🔴 Functions 0.77% 3/392
🔴 Lines 0.2% 72/36629

Test suite run success

13 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from e992bc8

@github-actions
Copy link
Contributor

Deployed changes to https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net

@jakebayliss jakebayliss requested a review from Copilot July 16, 2025 06:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a GitHub Actions workflow to automatically merge small content changes, specifically targeting PRs with 2 or fewer files changed in the content/ and public/ directories. The workflow aims to streamline the review process for minor content updates by eliminating manual approval steps.

Key changes:

  • Implements auto-detection of small content-only changes
  • Adds automated PR commenting for transparency
  • Enables automatic squash merging for eligible PRs

@github-actions
Copy link
Contributor

🚀 Lighthouse score comparison for PR slot and production

🌐 URL ⚡ Performance ♿ Accessibility ✅ Best Practices 🔍 SEO 📦 Bundle Size 🗑️ Unused Bundle
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/ 68 (⬇️16) 91 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/articles 73 (⬇️20) 96 78 57 (⬇️35) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/company/about-us 59 (⬇️12) 100 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/company/clients 72 (⬇️19) 94 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/company/contact-us 72 (⬇️18) 90 78 61 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/consulting 71 (⬇️19) 90 74 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/consulting/net-upgrade 49 (⬇️14) 89 59 54 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/consulting/web-applications 48 (⬇️14) 93 59 54 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/employment 69 (⬇️15) 94 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/events/angular-superpowers-tour 74 (⬇️16) 96 74 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/events/ai-workshop 75 (⬇️15) 90 74 61 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/netug/sydney 70 (⬇️9) 92 74 61 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/training/internship-fullstack 73 (⬇️11) 87 74 69 (⬇️31) 0.00 MB 0.00 MB

@uly1 uly1 enabled auto-merge (squash) August 3, 2025 23:03
@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2025

Deployed changes to https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2025

Deployed changes to https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net

@github-actions
Copy link
Contributor

github-actions bot commented Aug 3, 2025

🚀 Lighthouse score comparison for PR slot and production

🌐 URL ⚡ Performance ♿ Accessibility ✅ Best Practices 🔍 SEO 📦 Bundle Size 🗑️ Unused Bundle
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/ 55 (⬇️2) 91 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/articles 84 (⬇️1) 96 78 57 (⬇️35) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/company/about-us 65 100 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/company/clients 81 (⬇️4) 94 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/company/contact-us 83 (⬆️2) 90 78 61 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/consulting 78 (⬇️2) 90 74 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/consulting/net-upgrade 53 (⬇️7) 89 59 54 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/consulting/web-applications 48 (⬇️7) 93 59 54 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/employment 76 (⬇️2) 94 78 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/events/angular-superpowers-tour 83 (⬆️2) 96 74 69 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/events/ai-workshop 83 (⬇️1) 90 74 61 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/netug/sydney 78 (⬆️6) 92 74 61 (⬇️31) 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4108.azurewebsites.net/training/internship-fullstack 76 (⬆️3) 87 78 69 (⬇️31) 0.00 MB 0.00 MB

Copy link
Contributor

Copilot AI commented Dec 9, 2025

@wicksipedia I've opened a new pull request, #4378, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI commented Dec 9, 2025

@wicksipedia I've opened a new pull request, #4379, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 10, 2025 10:51
Addresses review feedback to extract the `maxFiles` PowerShell variable
to a job-level environment variable, making it properly accessible
throughout the workflow.

**Changes:**
- Added `MAX_FILES: 2` as job-level environment variable in
`detect-small-changes` job
- Updated PowerShell script to read from `$env:MAX_FILES` instead of
hardcoded value
- Fixed comment step to use `${{ env.MAX_FILES }}` (previously
referenced undefined `$maxFiles` in GitHub Actions context)
- Exposed as job output for potential cross-job usage

**Before:**
```yaml
run: |
  $maxFiles = 2
  # ...later in different step
  message: |
    - Maximum ${{ $maxFiles }} file...  # ❌ undefined in Actions context
```

**After:**
```yaml
env:
  MAX_FILES: 2
outputs:
  max-files: ${{ env.MAX_FILES }}
steps:
  run: |
    $maxFiles = [int]$env:MAX_FILES
    # ...later in different step
    message: |
      - Maximum ${{ env.MAX_FILES }} file...  # ✅ properly scoped
```

- Affected routes: N/A (GitHub Actions workflow only)

- [ ] If adding a new page, I have followed the [📃 New
Webpage](https://github.com/SSWConsulting/SSW.Website/issues/new?assignees=&labels=&projects=&template=new_webpage.yml&title=%F0%9F%93%84+%7B%7B+TITLE+%7D%7D+)
issue template

- [ ] If updating the livestream banner, I have tested and followed the
steps in [Wiki - Testing the live
banner](https://github.com/SSWConsulting/SSW.Website/wiki/Testing-the-live-banner)

- [ ] Include Done Video or screenshots

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: wicksipedia <[email protected]>
…ng (#4379)

Restructured the auto-merge workflow to ensure comments are posted
reliably in all scenarios, including when the merge step fails with an
exception.

**Changes:**
- Created a new `comment-result` job that runs separately from the
`auto-merge` job
- Job uses `if: always()` to ensure it runs even when the auto-merge job
fails
- Split comments into two conditional steps based on
`needs.auto-merge.result`:
- `Comment merge success` - Runs only when merge succeeds, includes
"This PR was automatically merged as a small content change."
- `Comment merge failure` - Runs only when merge fails, shows error
message only

**Before:**
```yaml
# Comments were steps within the auto-merge job
- name: Comment merge result
  if: always()
  with:
    message: |
      ${{ steps.auto-merge-pr.outcome == 'success' && '✅ **Auto-merge completed successfully!**' || '❌ **Auto-merge failed**' }}
      
      This PR was automatically merged as a small content change.
```

**After:**
```yaml
# Comments are now in a separate job that acts as a catch-all
comment-result:
  name: Comment Merge Result
  needs: [detect-small-changes, auto-merge]
  if: always() && needs.detect-small-changes.outputs.is-small-change == 'true'
  steps:
    - name: Comment merge success
      if: needs.auto-merge.result == 'success'
      with:
        message: |
          ✅ **Auto-merge completed successfully!**
          
          This PR was automatically merged as a small content change.

    - name: Comment merge failure
      if: needs.auto-merge.result == 'failure'
      with:
        message: |
          ❌ **Auto-merge failed** - Please check the workflow logs for details.
```

**Benefits:**
- Failure comments now post even if the auto-merge job encounters an
exception
- Better separation of concerns between merging and status reporting
- More reliable feedback to PR authors in all scenarios

- Affected routes: N/A (workflow change only)

- [ ] If adding a new page, I have followed the [📃 New
Webpage](https://github.com/SSWConsulting/SSW.Website/issues/new?assignees=&labels=&projects=&template=new_webpage.yml&title=%F0%9F%93%84+%7B%7B+TITLE+%7D%7D+)
issue template

- [ ] If updating the livestream banner, I have tested and followed the
steps in [Wiki - Testing the live
banner](https://github.com/SSWConsulting/SSW.Website/wiki/Testing-the-live-banner)

- [ ] Include Done Video or screenshots

<!-- START COPILOT CODING AGENT TIPS -->
---

💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: wicksipedia <[email protected]>
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.

✨ Small content changes do not need site deployments as a PR check

4 participants