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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/dependabotClosePRIssue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
if: github.event.pull_request.user.login == 'dependabot[bot]'
env:
pr_title: ${{github.event.pull_request.title}}
pr_number: ${{github.event.pull_request.number}}
run: |
issue_title="Dependabot PR $pr_title opened"
issue_title="Dependabot PR #$pr_number $pr_title opened"
issue=$(gh issue list --json number --jq '.[].number' --label "dependencies" --label "Dependabot" --search "is:issue is:open $issue_title")
gh issue close "$issue"
2 changes: 1 addition & 1 deletion .github/workflows/dependabotCreatePRIssue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
number: ${{github.event.pull_request.number}}
url: ${{github.event.pull_request.url}}
run: |
title="Dependabot PR $title opened"
title="Dependabot PR #$number $title opened"
labels="dependencies,Dependabot"
body="Dependabot has opened PR #$number
Link: $url"
Expand Down
Loading