Skip to content

Docs: [AEA-0000] - add Dependabot schedule#100

Merged
anthony-nhs merged 1 commit intomainfrom
add_dependabot_schedule
Apr 20, 2026
Merged

Docs: [AEA-0000] - add Dependabot schedule#100
anthony-nhs merged 1 commit intomainfrom
add_dependabot_schedule

Conversation

@anthony-nhs
Copy link
Copy Markdown
Collaborator

Add Dependabot schedule to the repository

Copilot AI review requested due to automatic review settings April 20, 2026 12:21
@anthony-nhs anthony-nhs requested a review from a team as a code owner April 20, 2026 12:21
Copy link
Copy Markdown

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 changes how Dependabot update PRs are auto-approved/auto-merged by moving the logic out of the pull request workflow and into a separate scheduled workflow.

Changes:

  • Removed the dependabot-auto-approve-and-merge reusable-workflow job from the PR workflow.
  • Added a new scheduled workflow that runs an action to auto-approve Dependabot PRs and enable auto-merge.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/pull_request.yml Removes the Dependabot auto-approve/merge job from the PR-triggered workflow.
.github/workflows/auto_approve_dependabot.yml Introduces a scheduled workflow to auto-approve dependency update PRs and enable auto-merge using repository secrets.

Comment on lines +1 to +6
name: Auto-approve dependency updates

on:
workflow_dispatch:
schedule:
- cron: '*/30 * * * *'
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The PR title/description says it adds a Dependabot schedule, but this change actually adds a scheduled GitHub Actions workflow to auto-approve Dependabot PRs (and the Dependabot update schedule already exists in .github/dependabot.yml). Please update the PR title/description to reflect the actual change to avoid confusion for reviewers/auditors.

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 10
permissions: {}
jobs:
dependabot-auto-approve-and-merge:
needs: quality_checks
uses: NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
secrets:
AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }}
AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }}
permissions:
pull-requests: write
contents: write

get_config_values:
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

Previously, the Dependabot auto-approve/merge job was part of the pull_request workflow and was gated on quality_checks via needs. With this removal, approvals/auto-merge enablement may now happen independently of PR quality checks (depending on the scheduled workflow/action behavior). If the intent is still to only enable auto-merge after checks succeed, consider reintroducing an explicit gate/verification step in the new workflow.

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +8
- cron: '*/30 * * * *'

permissions: {}
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The scheduled trigger runs every 30 minutes. That frequency is unusually high for an approval/auto-merge helper and can generate unnecessary GitHub Actions load/cost; it also increases the chance of overlapping runs if one execution takes >30 minutes. Consider reducing the cron frequency (e.g., hourly/daily) and/or adding a workflow/job concurrency group to prevent overlapping runs.

Suggested change
- cron: '*/30 * * * *'
permissions: {}
- cron: '0 * * * *'
permissions: {}
concurrency:
group: auto-approve-dependabot
cancel-in-progress: false

Copilot uses AI. Check for mistakes.
@anthony-nhs anthony-nhs merged commit 52ac38e into main Apr 20, 2026
12 checks passed
@anthony-nhs anthony-nhs deleted the add_dependabot_schedule branch April 20, 2026 12:25
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.

2 participants