Skip to content

Conversation

@nev21
Copy link
Contributor

@nev21 nev21 commented Dec 15, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 15, 2025 17:24
@nev21 nev21 merged commit 58929bb into main Dec 15, 2025
8 checks passed
@nev21 nev21 deleted the nev21/DependabotActions branch December 15, 2025 17:35
Copy link

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 updates the Dependabot-related GitHub Actions workflows by introducing new automation for Rush.json synchronization and PR auto-approval, while removing the auto-merge workflow and downgrading the rebase action version.

Key Changes:

  • Adds automated Rush.json version synchronization when Dependabot updates the Rush dependency
  • Replaces auto-merge workflow with a safer auto-approve workflow that waits for status checks
  • Downgrades the rebase action from v3 to v2

Reviewed changes

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

File Description
.github/workflows/sync-rush-versions.yml New workflow to automatically sync Rush.json version with Dependabot updates and regenerate lockfiles
.github/workflows/pr-auto-approve.yml New workflow to auto-approve PRs from Dependabot and nev21 after status checks pass
.github/workflows/dependabot-force-rebase.yml Downgrades peter-evans/rebase action from v3 to v2
.github/workflows/dependabot-auto-merge.yml Removes the auto-merge workflow entirely

id: detect
run: |
# Look for @microsoft/rush in the diff
if git diff -U0 HEAD~1 -- **/package.json | grep '"@microsoft/rush"'; then
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The git diff command assumes HEAD1 exists, which will fail on the first commit of a new branch or repository. Consider using 'origin/${{ github.base_ref }}' or checking if HEAD1 exists before running the diff.

Suggested change
if git diff -U0 HEAD~1 -- **/package.json | grep '"@microsoft/rush"'; then
if git diff -U0 origin/${{ github.base_ref }} -- **/package.json | grep '"@microsoft/rush"'; then

Copilot uses AI. Check for mistakes.
run: |
echo "Syncing rush.json with Dependabot bump..."
# Extract new Rush version from package.json
NEW_VERSION=$(jq -r '.devDependencies["@microsoft/rush"] // .dependencies["@microsoft/rush"]' package.json)
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

If the @microsoft/rush dependency is not found in package.json, NEW_VERSION will be empty or 'null', leading to an invalid rush.json update. Add validation to ensure NEW_VERSION is not empty before proceeding with the update.

Copilot uses AI. Check for mistakes.
echo "No changes to commit."
else
git commit -m "chore: sync rush.json and regenerate lockfiles"
git push --force-with-lease
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

Using --force-with-lease on Dependabot PRs could overwrite commits if the branch has been updated elsewhere. Since this workflow uses GITHUB_TOKEN and runs on pull_request events, consider whether force-pushing is appropriate or if regular push with proper error handling would be safer.

Copilot uses AI. Check for mistakes.
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