{"id":42596537,"url":"https://github.com/shteou/go-ghpr","last_synced_at":"2026-01-29T00:10:24.713Z","repository":{"id":45168746,"uuid":"396530426","full_name":"shteou/go-ghpr","owner":"shteou","description":"Automate Git/GitHub changes. Conveniently commit and merge via PR.","archived":false,"fork":false,"pushed_at":"2023-03-07T00:25:37.000Z","size":184,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T01:42:48.691Z","etag":null,"topics":["automation","git","github","go","golang","pull-request"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shteou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-15T23:20:42.000Z","updated_at":"2022-01-04T00:16:22.000Z","dependencies_parsed_at":"2024-06-21T00:24:56.273Z","dependency_job_id":"2010cf3c-f998-4cfb-b273-3b25ca73f4ea","html_url":"https://github.com/shteou/go-ghpr","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/shteou/go-ghpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shteou%2Fgo-ghpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shteou%2Fgo-ghpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shteou%2Fgo-ghpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shteou%2Fgo-ghpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shteou","download_url":"https://codeload.github.com/shteou/go-ghpr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shteou%2Fgo-ghpr/sbom","scorecard":{"id":821242,"data":{"date":"2025-08-11","repo":{"name":"github.com/shteou/go-ghpr","commit":"391f3a08a1cb8ac0a3f2da97c9db322bbb5c4fee"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 1/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/shteou/go-ghpr/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/shteou/go-ghpr/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/shteou/go-ghpr/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/shteou/go-ghpr/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/shteou/go-ghpr/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/shteou/go-ghpr/go.yml/master?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2456 / GHSA-449p-3h89-pw88","Warn: Project is vulnerable to: GO-2024-2466 / GHSA-mw99-9chc-xw7r","Warn: Project is vulnerable to: GO-2025-3367 / GHSA-r9px-m959-cxf4","Warn: Project is vulnerable to: GO-2025-3368 / GHSA-v725-9546-7q7m","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T15:39:06.817Z","repository_id":45168746,"created_at":"2025-08-23T15:39:06.817Z","updated_at":"2025-08-23T15:39:06.817Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28857080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"ssl_error","status_checked_at":"2026-01-28T22:56:00.861Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","git","github","go","golang","pull-request"],"created_at":"2026-01-29T00:10:24.215Z","updated_at":"2026-01-29T00:10:24.707Z","avatar_url":"https://github.com/shteou.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-ghpr (GitHub PRs)\n\n`go-ghpr` is a simple wrapper around Git and GitHub which helps to automate programmatic\nchanges to GitHub repositories via Pull Requests.\n\n## Supported workflows\n\n`go-ghpr` will make a shallow clone of the remote repository and supports\nmaking a single commit to a local branch. That can then be pushed remotely\nto a branch of the same name, and a PR may be raised from that branch to another.\n\n`gh-ghpr` then supports waiting for conditions on that PR (e.g. waiting for it to become\nmergeable or to have a passing status check), merging the PR, and again waiting\n\nMost of these steps are optional, so a wide range of workflows can be accomodated.\n\n## Usage\n\n```go\nfunc DeleteDockerfileUpdater(repoName string, w *git.Worktree) (string, *object.Signature, error) {\n\tw.Remove(\"Dockerfile\")\n\n\tcommitMessage := \"chore: deleting dockerfle for \" + repoName\n\treturn commitMessage, \u0026object.Signature{Name: \"Stewart Platt\", Email: \"shteou@gmail.com\"}, nil\n}\n\nfunc PushDockerfileDeletionBranch(owner string, name string) error {\n\tcreds := ghpr.Credentials{Username: \"***\", Token: \"***\"}\n\trepo := ghpr.NewRepo(owner, name)\n\tdefer repo.Close()\n\n\terr := repo.Clone(creds)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tstrategy := ghpr.BackoffStrategy{\n\t\tMinPollTime:       time.Second * 20,\n\t\tMaxPollTime:       time.Second * 60,\n\t\tPollBackoffFactor: 1.05,\n\t}\n\tstatusChecks := []ghpr.Check{{Name: \"Semantic Pull Request\", CheckType: \"status\"}}\n\n\tchange := ghpr.NewChange(repo, \"chore-make-change\", creds, func(w *git.Worktree) (string, *object.Signature, error) {\n\t\treturn UpdateRequirements(service, version, w)\n\t})\n\n\terr = change.Push()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ttimeout, cancel := context.WithTimeout(context.Background(), time.Duration(time.Second*30))\n\tdefer cancel()\n\n\tpr := ghpr.NewPR(timeout, change, creds)\n\tpr.Create(timeout, \"master\", \"chore: make change\", \"\")\n\n\terr = pr.WaitForPRChecks(timeout, statusChecks, strategy)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\terr = pr.Merge(timeout, \"merge\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn pr.WaitForMergeChecks(timeout, statusChecks, strategy)\n}\n\nfunc main() {\n\terr := PushDockerfileDeletionBranch(\"my\", \"repository\")\n\tif err != nil {\n\t\tprintln(err.Error())\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshteou%2Fgo-ghpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshteou%2Fgo-ghpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshteou%2Fgo-ghpr/lists"}