Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dependabot PR number to dependabot issue title for title uniqueness and automated closeability #8473

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

DavidMcClatchey
Copy link
Collaborator

BACKEND PULL REQUEST

Related Issue

Changes Proposed

  • This adds the dependabot PR number to the dependabot issue title so that a unique result comes back when querying for the issue associated with the PR. With only one dependabot issue result coming back, the issue tied to the PR should now be closeable within the dependabotClosePRIssue.yml.

Testing

  • I tested this by first manually updating the title of Dependabot PR #8442 Bump the storybook group in /frontend with 13 updates opened #8443 via adding the associated PR number 8442 so that the issue title would reflect what it would look like if the new dependabotCreatePRIssue.yml had created it. Then I ran the gh commands for closing the issue from my local computer.
  • If you would like to test, you can find a dependabot issue that should have been closed and follow the same process.

@DavidMcClatchey DavidMcClatchey changed the title Adding PR number to issue title for title uniqueness and automated closeability Adding dependabot PR number to dependabot issue title for title uniqueness and automated closeability Feb 6, 2025
Copy link

sonarqubecloud bot commented Feb 6, 2025

Copy link
Collaborator

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

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

Tested this locally as well using this PR #6919 -- works as you described

When merged in, we would have to manually close the currently open dependabot PRs or update the titles for this to work right? 🤔

@DavidMcClatchey
Copy link
Collaborator Author

Tested this locally as well using this PR #6919 -- works as you described

When merged in, we would have to manually close the currently open dependabot PRs or update the titles for this to work right? 🤔

Good call, yea this solution only applies to dependabot PRs created after this gets merged, so for any currently open dependabot PRs that never get merged but get superseded by another dependabot PR we'd have to manually close their associated issues or update the titles like you suggested. I think updating the titles is a good idea so we don't have to keep tabs on what gets superseded. I'll add that scenario/process to the cleanup spike!

@DavidMcClatchey
Copy link
Collaborator Author

DavidMcClatchey commented Feb 6, 2025

Tested this locally as well using this PR #6919 -- works as you described
When merged in, we would have to manually close the currently open dependabot PRs or update the titles for this to work right? 🤔

Good call, yea this solution only applies to dependabot PRs created after this gets merged, so for any currently open dependabot PRs that never get merged but get superseded by another dependabot PR we'd have to manually close their associated issues or update the titles like you suggested. I think updating the titles is a good idea so we don't have to keep tabs on what gets superseded. I'll add that scenario/process to the cleanup spike!

Edit: I just realized Github's definition of "closed" is also when a PR gets merged and not just when it's closed closed without merging. So, the scenario would apply to dependabot PRs that get merged after this PR gets merged as well. In light of that, I'll just manually modify issue titles once this is merged in since the issue renaming will need a quickish turnaround.
Extra edit: @emyl3 was fully correct and this was just me working through it in public 😅

Copy link
Collaborator

@mpbrown mpbrown left a comment

Choose a reason for hiding this comment

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

Tested it with #7555 and everything looks good!

@DavidMcClatchey DavidMcClatchey added this pull request to the merge queue Feb 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2025
@DavidMcClatchey DavidMcClatchey added this pull request to the merge queue Feb 10, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2025
@DavidMcClatchey DavidMcClatchey added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit 09446b8 Feb 10, 2025
34 checks passed
@DavidMcClatchey DavidMcClatchey deleted the david/close-dependabot-issue branch February 10, 2025 15:02
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.

3 participants