DEVOPS-1218: Improvements to the dependabot PRs for .pre-commit-hooks. (Auto-merge, skip jira issue key, and run .pre-commit on all files) - #222
Open
RomFloreani wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves automation around Dependabot PRs that bump the .pre-commit-hooks group by ensuring pre-commit runs appropriately, Jira key enforcement is skipped for expected bot PRs, and eligible Dependabot PRs can be auto-merged.
Changes:
- Update reusable pre-commit workflow to run
pre-commiton all files for Dependabotpre-commit-hooksbumps. - Extend Jira PR actions workflow to exempt Dependabot
pre-commit-hooksPRs from requiring a Jira issue key. - Expand Dependabot auto-merge workflow to allow multiple Dependabot groups and add group validation logic.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/reusable-pre_commit.yml | Adds conditional logic to run pre-commit on all files for Dependabot pre-commit-hooks PRs. |
| .github/workflows/reusable-jira-pr_actions.yml | Adds Dependabot pre-commit-hooks exemption path for Jira key enforcement. |
| .github/workflows/reusable-dependabot-auto-merge.yml | Renames/expands inputs to allow multiple groups and validates group membership before auto-merge. |
| .github/workflows/pre-commit.yml | Adds clarification comments for PR trigger scope supporting required checks for auto-merge. |
| .github/workflows/dependabot-auto-merge.yml | Switches to calling the local reusable auto-merge workflow and passes multiple allowed groups. |
Suppressed comments (1)
.github/workflows/reusable-pre_commit.yml:91
- Same as above: use a path-segment match for the Dependabot group to avoid accidentally treating other branches as
pre-commit-hooksbumps.
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.head_ref, 'pre-commit-hooks') }}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+44
to
+48
| IFS=',' read -ra groups <<< "$GROUPS" | ||
| for group in "${groups[@]}"; do | ||
| group=$(echo "$group" | xargs) | ||
| if [ -n "$group" ] && echo "$HEAD_REF" | grep -q "/${group}"; then | ||
| allowed=true |
Comment on lines
8
to
10
| call-workflow-dependabot-auto-merge: | ||
| uses: MiraGeoscience/CI-tools/.github/workflows/reusable-dependabot-auto-merge.yml@3ff92aeffa5b92d646abea073ed5ad06117e57f6 # v3.11.0 | ||
| uses: ./.github/workflows/reusable-dependabot-auto-merge.yml | ||
| permissions: |
| key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
| - name: Run pre-commit on modified files | ||
| if: ${{ (github.event_name == 'pull_request') }} | ||
| if: ${{ github.event_name == 'pull_request' && !(github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.head_ref, 'pre-commit-hooks')) }} |
- Add IS_DEPENDABOT_PRECOMMIT exemption in reusable JIRA PR checks. - Convert reusable-dependabot-auto-merge to accept a list of groups. - Pass mirageo-ci-tools and pre-commit-hooks groups from caller. - Run all pre-commit hooks on Dependabot pre-commit-hooks PRs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
RomFloreani
force-pushed
the
DEVOPS-1218
branch
from
August 28, 2026 17:31
a65a656 to
95a9693
Compare
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DEVOPS-1218 - Improvements to the dependabot PRs for .pre-commit-hooks. (Auto-merge, skip jira issue key, and run .pre-commit on all files)