Skip to content

fix(dependabot): replace gh CLI with curl#65

Merged
pgmac merged 2 commits into
mainfrom
fix/replace-gh-cli-with-curl
May 7, 2026
Merged

fix(dependabot): replace gh CLI with curl#65
pgmac merged 2 commits into
mainfrom
fix/replace-gh-cli-with-curl

Conversation

@pgmac
Copy link
Copy Markdown
Collaborator

@pgmac pgmac commented May 7, 2026

Summary

  • Replaces all gh CLI calls with curl + jq against the GitHub REST API
  • Fixes failure in repos where gh is not installed on self-hosted runners (e.g. ansible-role-nomad)

Changes

File Change
dependabot-alert.yml gh api /dependabot/alertscurl
dependabot-management.yml gh pr listcurl /search/issues
dependabot-management.yml gh pr createcurl POST /pulls (fetches default branch first)

After merge

Run terraform apply in terraform-github to re-distribute the updated dependabot-alert.yml to all managed repos.

Test plan

  • Merge to main
  • Run terraform apply in terraform-github
  • Manually trigger dependabot-alert.yml in a repo that was failing (e.g. ansible-role-nomad)

🤖 Generated with Claude Code

gh CLI is not available on all self-hosted runners (e.g. ansible-role-nomad).
Replace all gh calls with curl + jq against the GitHub REST API:
- dependabot-alert.yml: gh api -> curl /dependabot/alerts
- dependabot-management.yml: gh pr list -> curl /search/issues
- dependabot-management.yml: gh pr create -> curl POST /pulls (fetches
  default_branch first so base is always correct)

curl and jq are universally available; no tool installation required.
Re-distribute dependabot-alert.yml via terraform-github apply after merge.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pgmac pgmac requested a review from a team as a code owner May 7, 2026 02:18
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

SBoM Vulnerability Scan Results

Scan Summary:

  • Total vulnerabilities found: 0
  • Critical: 0
  • High: 0
  • Medium: 0

SBoM Details:

  • Generated from commit: 3e9d8fa
  • SBoM format: CycloneDX
  • Repository: pgmac-net/pg-actions

View full SARIF report

This comment will be updated on each commit

@pgmac pgmac merged commit ae4ae9a into main May 7, 2026
1 check passed
@pgmac pgmac deleted the fix/replace-gh-cli-with-curl branch May 7, 2026 02:22
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.

1 participant