Skip to content

chore(deps): update bcgov/action-diff-triggers action to v1#43

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/major-github-actions
Jan 26, 2026
Merged

chore(deps): update bcgov/action-diff-triggers action to v1#43
renovate[bot] merged 1 commit intomainfrom
renovate/major-github-actions

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 26, 2026

This PR contains the following updates:

Package Type Update Change
bcgov/action-diff-triggers action major v0.2.0v1.0.0

Release Notes

bcgov/action-diff-triggers (bcgov/action-diff-triggers)

v1.0.0

Compare Source

Release Notes - v1.0.0

🚨 Breaking Changes

diff_branch Input Removed

The diff_branch input has been removed and replaced with the more flexible ref input.

✨ New Features

Non-PR Event Support

The action now works with all GitHub Actions events, not just pull requests:

  • push events
  • workflow_dispatch (manual triggers)
  • schedule events
  • ✅ Any other GitHub Actions event

Example:

on:
  push:
    branches: [main]

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: bcgov-nr/action-diff-triggers@v1.0.0
        with:
          triggers: ('backend/' 'frontend/')

Defaults to HEAD^ for push events

Flexible ref Input

The new ref input supports multiple reference types:

  • Branches: main, develop, feature/branch
  • Commit SHAs: abc123def456
  • Tags: v1.0.0
  • Local refs (non-PR only): HEAD^, HEAD~2

Examples:

Compare against a branch

ref: main

Compare against a specific commit

ref: abc123def456

Compare against previous commit (non-PR events)

ref: HEAD^

Compare against 2 commits ago (non-PR events)

ref: HEAD~2
Local Ref Detection

For non-PR events, the action automatically detects local refs (starting with HEAD) and uses them directly without fetching from remote, improving performance.

Fork PR Support

Automatic fork PR detection and handling in pull_request_target context - no configuration needed!

🔧 Improvements

Smart Path Matching

Improved trigger path matching using git pathspec matching for more accurate detection of file changes.

Better Trigger Parsing

Enhanced parsing of trigger paths that contain spaces, properly handling quoted strings like 'my path/file.txt'.

Optimized Fetch Depth
  • PR events: Fetches minimal history (depth: 1) for faster execution
  • Non-PR events: Fetches full history (depth: 0) to support local refs like HEAD^
Code Simplification
  • Unified remote handling (always adds base remote)
  • Simplified ref determination logic
  • Better default behavior for different event types

📋 Default Behavior

Event Type Default ref Notes
pull_request Base repo default branch Fetched from remote
pull_request_target Base repo default branch Fetched from remote
push HEAD^ Local ref, no fetch needed
workflow_dispatch HEAD^ Local ref, no fetch needed
Other events HEAD^ Local ref, no fetch needed

🔄 Backward Compatibility

  • PR events work exactly as before - Defaults to base repo default branch
  • Fork PR support maintained - Automatic detection and handling
  • All existing PR workflows continue to work - Just replace diff_branch with ref

📚 Documentation

  • Updated README with comprehensive examples
  • Added examples for push events, workflow_dispatch, and custom refs
  • Migration guide included

🧪 Testing

  • Added comprehensive test workflows
  • Tests for PR events, push events, and custom refs
  • Improved test coverage

What's Changed

Full Changelog: bcgov/action-diff-triggers@v0.2.0...v1.0.0


Configuration

📅 Schedule: Branch creation - "before 6am every weekday" in timezone America/Vancouver, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot enabled auto-merge (squash) January 26, 2026 08:44
@sonarqubecloud
Copy link

@renovate renovate bot merged commit a906d99 into main Jan 26, 2026
6 checks passed
@renovate renovate bot deleted the renovate/major-github-actions branch January 26, 2026 08:48
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.

0 participants