Skip to content

fix: reuse existing PR for dep updates#9

Merged
ivoIturrieta merged 6 commits intomainfrom
fix/update-deps-reuse-pr
Mar 26, 2026
Merged

fix: reuse existing PR for dep updates#9
ivoIturrieta merged 6 commits intomainfrom
fix/update-deps-reuse-pr

Conversation

@ivoIturrieta
Copy link
Copy Markdown
Collaborator

@ivoIturrieta ivoIturrieta commented Mar 26, 2026

Summary

  • Uses a fixed branch name (deps/update-unlayer) instead of date-based names (deps/update-unlayer-YYYYMMDD)
  • If an open PR already exists, force-pushes updated versions to the same branch and updates the PR body
  • If no open PR exists, creates a new one
  • Prevents accumulating stale dep update PRs when deps change multiple times before merging

Test plan

  • Trigger update-deps workflow manually — should create a PR if deps are outdated
  • Trigger again — should update the existing PR, not create a new one

📖 Storybook Preview: https://reimagined-adventure-16yv2wp.pages.github.io/pr/9/

- Use fixed branch name (deps/update-unlayer) instead of dated names
- If an open PR exists, force-push new versions and update PR body
- If no PR exists, create a new one
- Prevents accumulating stale dep update PRs
Copilot AI review requested due to automatic review settings March 26, 2026 10:38
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

Updates the dependency-update GitHub Actions workflow to reuse a single long-lived branch/PR for Unlayer dependency bumps, avoiding multiple stale “deps update” PRs when versions change frequently.

Changes:

  • Switches from date-based branch names to a fixed deps/update-unlayer branch.
  • If an open PR already exists for that branch, force-pushes new updates and edits the PR body instead of creating a new PR.
  • If no open PR exists, creates a new PR from the fixed branch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-deps.yml Outdated
Comment thread .github/workflows/update-deps.yml Outdated
Comment thread .github/workflows/update-deps.yml Outdated
Comment thread .github/workflows/update-deps.yml
- Add concurrency group to prevent race conditions
- Fetch remote branch before --force-with-lease (fixes shallow clone issue)
- Fail explicitly on gh API errors instead of silently falling through
- Use --force (not --force-with-lease) in create path for stale branches
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-deps.yml
Comment thread .github/workflows/update-deps.yml Outdated
- Use jq // empty to avoid "null" string when no PRs exist
- Skip commit/push if branch already has the same versions
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-deps.yml Outdated
Comment thread .github/workflows/update-deps.yml Outdated
Both paths now share the same checkout/commit/push flow.
Branch always starts from main HEAD with updated files.
Only the PR step differs (edit existing vs create new).
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-deps.yml Outdated
Comment thread .github/workflows/update-deps.yml Outdated
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-deps.yml Outdated
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/update-deps.yml
Comment thread .github/workflows/update-deps.yml
@ivoIturrieta ivoIturrieta merged commit 8a1d89e into main Mar 26, 2026
6 checks passed
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