Skip to content

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
mainfrom
DEVOPS-1218
Open

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
RomFloreani wants to merge 3 commits into
mainfrom
DEVOPS-1218

Conversation

@RomFloreani

@RomFloreaniRomFloreani commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

DEVOPS-1218 - Improvements to the dependabot PRs for .pre-commit-hooks. (Auto-merge, skip jira issue key, and run .pre-commit on all files)

CopilotAI lite review requested due to automatic review settings August 26, 2026 13:39
@github-actionsgithub-actionsBot changed the title Devops 1218DEVOPS-1218: Improvements to the dependabot PRs for .pre-commit-hooks. (Auto-merge, skip jira issue key, and run .pre-commit on all files)Aug 26, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-commit on all files for Dependabot pre-commit-hooks bumps.
  • Extend Jira PR actions workflow to exempt Dependabot pre-commit-hooks PRs 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
FileDescription
.github/workflows/reusable-pre_commit.ymlAdds conditional logic to run pre-commit on all files for Dependabot pre-commit-hooks PRs.
.github/workflows/reusable-jira-pr_actions.ymlAdds Dependabot pre-commit-hooks exemption path for Jira key enforcement.
.github/workflows/reusable-dependabot-auto-merge.ymlRenames/expands inputs to allow multiple groups and validates group membership before auto-merge.
.github/workflows/pre-commit.ymlAdds clarification comments for PR trigger scope supporting required checks for auto-merge.
.github/workflows/dependabot-auto-merge.ymlSwitches 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-hooks bumps.
 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:
Comment thread.github/workflows/reusable-jira-pr_actions.yml Outdated
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')) }}
RomFloreaniand others added 2 commits August 28, 2026 13:30
- 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>
@github-actions

Copy link
Copy Markdown

⚠️Force push detected - Previous Copilot review comments may no longer be relevant to the current code. Please resolve any outdated threads and re-request a Copilot review when ready.

Sign up for freeto 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.

2 participants

@RomFloreani