A Script to Check Whether Dependabot Has Opened Pull Requests
Overview
When Dependabot opens pull requests, such as updates to Terraform providers,
they are easy to miss because you are not assigned to them.
For this reason, you need to check on them periodically.
However, when you manage a large number of repositories, visiting every one of them is tedious, so let’s write a script that lets us view them all at once.
Steps
Authenticate with the gh command in advance.
1 | gh auth login |
Script
1 |
|
Console output
1 | Showing 1 of 1 pull request in kenzo0107/xxx-terraform that matches your search |
Since there were only a handful of projects to count, I kept the target Terraform projects in an array. If you want to make that part dynamic as well, you could instead extract repositories that contain a file identifying them as a Terraform project.
That’s all.
I hope you find this helpful.
A Script to Check Whether Dependabot Has Opened Pull Requests
https://kenzo0107.github.io/en/2023/07/14/show-dependabot-pull-requests/
