{"id":13582149,"url":"https://github.com/drone/go-scm","last_synced_at":"2026-01-25T03:34:50.195Z","repository":{"id":37430912,"uuid":"113508240","full_name":"drone/go-scm","owner":"drone","description":"Package scm provides a unified interface to multiple source code management systems.","archived":false,"fork":false,"pushed_at":"2026-01-22T11:14:08.000Z","size":1750,"stargazers_count":184,"open_issues_count":31,"forks_count":259,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-01-23T02:19:34.106Z","etag":null,"topics":["bitbucket","bitbucket-server","gitea","github","github-enterprise","gitlab","gogs","scm","vcs"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/drone/go-scm/scm#pkg-examples","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drone.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":"COPYRIGHT","agents":null,"dco":null,"cla":null}},"created_at":"2017-12-07T23:18:09.000Z","updated_at":"2026-01-04T16:27:42.000Z","dependencies_parsed_at":"2023-12-19T17:53:22.055Z","dependency_job_id":"58c84432-ea74-46a7-96ca-c001962fd3ad","html_url":"https://github.com/drone/go-scm","commit_stats":null,"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/drone/go-scm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone%2Fgo-scm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone%2Fgo-scm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone%2Fgo-scm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone%2Fgo-scm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drone","download_url":"https://codeload.github.com/drone/go-scm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drone%2Fgo-scm/sbom","scorecard":{"id":356666,"data":{"date":"2025-08-11","repo":{"name":"github.com/drone/go-scm","commit":"15eef26caca09eaf503facdcb400ac3067560839"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.2,"checks":[{"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":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":9,"reason":"Found 11/12 approved changesets -- score normalized to 9","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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["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"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T09:45:56.833Z","repository_id":37430912,"created_at":"2025-08-18T09:45:56.833Z","updated_at":"2025-08-18T09:45:56.833Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28742975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T02:46:29.005Z","status":"ssl_error","status_checked_at":"2026-01-25T02:44:29.968Z","response_time":113,"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":["bitbucket","bitbucket-server","gitea","github","github-enterprise","gitlab","gogs","scm","vcs"],"created_at":"2024-08-01T15:02:27.405Z","updated_at":"2026-01-25T03:34:50.179Z","avatar_url":"https://github.com/drone.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-scm\n\n[![Go Doc](https://img.shields.io/badge/godoc-reference-5272B4.svg?style=flat-square)](http://godoc.org/github.com/drone/go-scm/scm)\n\nPackage scm provides a unified interface to multiple source code management systems including GitHub, GitHub Enterprise, Bitbucket, Bitbucket Server, Gitee, Gitea and Gogs.\n\n## Getting Started\n\nCreate a GitHub client:\n\n```Go\npackage main\n\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/github\"\n)\n\nfunc main() {\nclient := github.NewDefault()\n}\n```\n\nCreate a GitHub Enterprise client:\n\n```Go\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/github\"\n)\n\nfunc main() {\n    client, err := github.New(\"https://github.company.com/api/v3\")\n}\n```\n\nCreate a Bitbucket client:\n\n```Go\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/bitbucket\"\n)\n\nfunc main() {\n    client, err := bitbucket.New()\n}\n```\n\nCreate a Bitbucket Server (Stash) client:\n\n```Go\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/stash\"\n)\n\nfunc main() {\n    client, err := stash.New(\"https://stash.company.com\")\n}\n```\n\nCreate a Gitea client:\n\n```Go\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/gitea\"\n)\n\nfunc main() {\n  client, err := gitea.New(\"https://gitea.company.com\")\n}\n```\n\nCreate a Gitee client:\n\n```Go\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/gitee\"\n)\n\nfunc main() {\n  client, err := gitee.New(\"https://gitee.com/api/v5\")\n}\n```\n\n## Authentication\n\nThe scm client does not directly handle authentication. Instead, when creating a new client, provide an `http.Client` that can handle authentication for you. For convenience, this library includes oauth1 and oauth2 implementations that can be used to authenticate requests.\n\n```Go\npackage main\n\nimport (\n  \"github.com/drone/go-scm/scm\"\n  \"github.com/drone/go-scm/scm/driver/github\"\n  \"github.com/drone/go-scm/scm/transport\"\n  \"github.com/drone/go-scm/scm/transport/oauth2\"\n)\n\nfunc main() {\n  client := github.NewDefault()\n\n  // provide a custom http.Client with a transport\n  // that injects the oauth2 token.\n  client.Client = \u0026http.Client{\n    Transport: \u0026oauth2.Transport{\n      Source: oauth2.StaticTokenSource(\n        \u0026scm.Token{\n          Token: \"ecf4c1f9869f59758e679ab54b4\",\n        },\n      ),\n    },\n  }\n\n  // provide a custom http.Client with a transport\n  // that injects the private GitLab token through\n  // the PRIVATE_TOKEN header variable.\n  client.Client = \u0026http.Client{\n    Transport: \u0026transport.PrivateToken{\n      Token: \"ecf4c1f9869f59758e679ab54b4\",\n    },\n  }\n}\n```\n\n## Usage\n\nThe scm client exposes dozens of endpoints for working with repositories, issues, comments, files and more. Please see the [godocs](https://pkg.go.dev/github.com/drone/go-scm/scm#pkg-examples) to learn more.\n\nExample code to get an issue:\n\n```Go\nissue, _, err := client.Issues.Find(ctx, \"octocat/Hello-World\", 1)\n```\n\nExample code to get a list of issues:\n\n```Go\nopts := scm.IssueListOptions{\n  Page:   1,\n  Size:   30,\n  Open:   true,\n  Closed: false,\n}\n\nissues, _, err := client.Issues.List(ctx, \"octocat/Hello-World\", opts)\n```\n\nExample code to create an issue comment:\n\n```Go\nin := \u0026scm.CommentInput{\n  Body: \"Found a bug\",\n}\n\ncomment, _, err := client.Issues.CreateComment(ctx, \"octocat/Hello-World\", 1, in)\n```\n\n## Useful links\n\nHere are some useful links to providers API documentation:\n\n- [Azure DevOps](https://docs.microsoft.com/en-us/rest/api/azure/devops/git/?view=azure-devops-rest-6.0)\n- [Bitbucket cloud API](https://developer.atlassian.com/cloud/bitbucket/rest/intro/)\n- [Bitbucket server/Stash API](https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html)\n- [Gitea API](https://gitea.com/api/swagger/#/)\n- [Gitee API](https://gitee.com/api/swagger/#/)\n- [Github API](https://docs.github.com/en/rest/reference)\n- [Gitlab API](https://docs.gitlab.com/ee/api/api_resources.html)\n- [Gogs API](https://github.com/gogs/docs-api)\n\n## Release procedure\n\nRun the changelog generator.\n\n```BASH\ndocker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p go-scm -t \u003csecret github token\u003e\n```\n\nYou can generate a token by logging into your GitHub account and going to Settings -\u003e Personal access tokens.\n\nNext we tag the PR's with the fixes or enhancements labels. If the PR does not fufil the requirements, do not add a label.\n\nRun the changelog generator again with the future version according to semver.\n\n```BASH\ndocker run -it --rm -v \"$(pwd)\":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone -p go-scm -t \u003csecret token\u003e --future-release v1.15.2\n```\n\nCreate your pull request for the release. Get it merged then tag the release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone%2Fgo-scm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrone%2Fgo-scm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrone%2Fgo-scm/lists"}