{"id":34176684,"url":"https://github.com/eujoy/gitpr","last_synced_at":"2026-03-12T19:34:54.669Z","repository":{"id":51282512,"uuid":"264277241","full_name":"eujoy/gitpr","owner":"eujoy","description":"Retrieve pull requests of repositories and their details","archived":false,"fork":false,"pushed_at":"2022-12-12T14:22:11.000Z","size":2094,"stargazers_count":7,"open_issues_count":4,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-11T03:17:33.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eujoy.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}},"created_at":"2020-05-15T19:09:30.000Z","updated_at":"2025-07-31T11:04:07.000Z","dependencies_parsed_at":"2023-01-27T20:46:19.879Z","dependency_job_id":null,"html_url":"https://github.com/eujoy/gitpr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eujoy/gitpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eujoy%2Fgitpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eujoy%2Fgitpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eujoy%2Fgitpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eujoy%2Fgitpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eujoy","download_url":"https://codeload.github.com/eujoy/gitpr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eujoy%2Fgitpr/sbom","scorecard":{"id":384882,"data":{"date":"2025-08-11","repo":{"name":"github.com/eujoy/gitpr","commit":"139d2d7485671d5dfb3092c0d75bf3b25ce6fdbf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"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":"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":"Code-Review","score":0,"reason":"Found 0/12 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/master-actions.yml:1","Warn: no topLevel permission defined: .github/workflows/pull-request.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":"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":"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/master-actions.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/eujoy/gitpr/master-actions.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/master-actions.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/eujoy/gitpr/master-actions.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull-request.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/eujoy/gitpr/pull-request.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull-request.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/eujoy/gitpr/pull-request.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: goCommand not pinned by hash: .github/workflows/master-actions.yml:22","Warn: goCommand not pinned by hash: .github/workflows/pull-request.yml:22","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   2 goCommand 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: MIT License: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 22 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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9"],"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-18T16:22:12.796Z","repository_id":51282512,"created_at":"2025-08-18T16:22:12.796Z","updated_at":"2025-08-18T16:22:12.796Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30439986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T14:34:45.044Z","status":"ssl_error","status_checked_at":"2026-03-12T14:09:33.793Z","response_time":114,"last_error":"SSL_read: 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":[],"created_at":"2025-12-15T12:46:47.926Z","updated_at":"2026-03-12T19:34:54.661Z","avatar_url":"https://github.com/eujoy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![version](https://img.shields.io/badge/version-v0.1.0-brightgreen)\n![golang-version](https://img.shields.io/badge/Go-1.14-blue)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![master-actions Actions Status](https://github.com/eujoy/gitpr/workflows/master-actions/badge.svg)](https://github.com/eujoy/gitpr/actions)\n\n# Preparation / Installation\n\nTo be able to properly use this tool, the following steps are required :\n\n* Clone this repository to your local environment.\n* Create a new `Personal Access Token` on github and include the scopes :\n  * `repo` : Full control of private repositories\n  * `admin:org` : Full control of orgs and teams, read and write org projects\n* Make sure to enable SSO on your access token so allow the script to use it for repositories/organizations that have SSO enabled.\n* Create a new environmental variable to store the access token created :\n  *  `GITPR_GITHUB_AUTH_TOKEN=\u003cyour token\u003e`\n\n# Commands Usage\n\n## Usage of the script in general\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go -h\nNAME:\n   GitPullRequests - CLI tool to check status of pull requests in github, get pull requests of users and extract metrics on them.\n\nUSAGE:\n   main [global options] command [command options] [arguments...]\n\nVERSION:\n   0.0.2\n\nAUTHOR:\n   Angelos Giannis\n\nCOMMANDS:\n   find, f              Find the pull requests of multiple user repositories.\n   pull-requests, p     Retrieves and prints all the pull requests of a user for a repository.\n   user-repos, u        Retrieves and prints the repos of an authenticated user.\n   widget, w            Display a widget based terminal which will include all the details required.\n   commit-list, c       Retrieves and prints the list of commits between two provided tags or commits.\n   create-release, cr   Retrieves all the commits between two tags and creates a list of them to be used a release description..\n   pr-metrics, m        Retrieves and prints the number of pull requests for a repository that have been created during a specific time period as well as the lead time of those pull requests.\n   release-report, r    Retrieves the releases that were published and/or created within a time range for a repository and prints a report based on them.\n   publish-metrics, pm  Retrieves the metric details for a list of sprints, prepares the report information for each one of them and publishes the report data the provided google spreadsheet.\n   workflows, wf_exec   Retrieves and prints the workflow executions of a repository.\n   help, h              Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --help, -h     show help (default: false)\n   --version, -v  print the version (default: false)\n```\n\n## Usage of `find` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go find -h                                                                                                                                                                                                                [master]\nNAME:\n   main find - Find the pull requests of multiple user repositories.\n\nUSAGE:\n   main find [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --help, -h                    show help (default: false)\n```\n\n## Usage of `pull-requests` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go pull-requests -h                                                                                                                                                                                                       [master]\nNAME:\n   main pull-requests - Retrieves and prints all the pull requests of a user for a repository.\n\nUSAGE:\n   main pull-requests [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --owner value, -o value       Owner of the repository to use.\n   --repository value, -r value  Repository name to use.\n   --base value, -b value        Base branch to check pull requests against. (default: \"master\")\n   --state value, -a value       State of the pull request. (default: \"open\")\n   --page_size value, -s value   Size of each page to load. (default: 10)\n   --help, -h                    show help (default: false)\n```\n\n## Usage of `user-repos` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go user-repos -h                                                                                                                                                                                                          [master]\nNAME:\n   main user-repos - Retrieves and prints the repos of an authenticated user.\n\nUSAGE:\n   main user-repos [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --page_size value, -s value   Size of each page to load. (default: 10)\n   --help, -h                    show help (default: false)\n```\n\n## Usage of `widget` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go widget -h                                                                                                                                                                                                              [master]\nNAME:\n   main widget - Display a widget based terminal which will include all the details required.\n\nUSAGE:\n   main widget [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --help, -h                    show help (default: false)\n```\n\n## Usage of `commit-list` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go commit-list                                                                                                                                                           *[master]\nNAME:\n   main commit-list - Retrieves and prints the list of commits between two provided tags or commits.\n\nUSAGE:\n   main commit-list [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --owner value, -o value       Owner of the repository to use.\n   --repository value, -r value  Repository name to use.\n   --start_tag value             The starting tag/commit to compare against.\n   --end_tag value               The ending/latest tag/commit to compare against. (default: \"HEAD\")\n   --help, -h                    show help (default: false)\n```\n\n## Usage of `create-release` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go create-release -h                                                                                                                                                     *[master]\nNAME:\n   main create-release - Retrieves all the commits between two tags and creates a list of them to be used a release description..\n\nUSAGE:\n   main create-release [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value     Github authorization token. (default: \"~\")\n   --owner value, -o value          Owner of the repository to use.\n   --repository value, -r value     Repository name to use.\n   --release_name value, -n value   Define the release name to be set. You can use a string pattern to set the place where the new release tag will be set. (default: \"Release version : %v\")\n   --latest_tag value, -l value     The latest tag to compare against.\n   --release_tag value, -v value    Release tag to be used (and checked against if exists). (default: \"HEAD\")\n   --check_pattern value, -p value  Define the pattern to check the files modified against.\n   --draft_release, -d              Defines if the release will be a draft or published. (default: false) (default: false)\n   --force_create, -f               Forces the creation of the release without asking for confirmation. (default: false) (default: false)\n   --help, -h                       show help (default: false)\n```\n\n## usage of `pr-metrics` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go pr-metrics -h                                                                                                                                                     *[master]\nNAME:\n   main pr-metrics - Retrieves and prints the number of pull requests for a repository that have been created during a specific time period as well as the lead time of those pull requests.\n\nUSAGE:\n   main pr-metrics [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --owner value, -o value       Owner of the repository to use.\n   --repository value, -r value  Repository name to use.\n   --base value, -b value        Base branch to check pull requests against. (default: \"master\")\n   --state value, -a value       State of the pull request. (default: \"open\")\n   --start_date value, -f value  Start date of the time range to check. [Expected format: 'yyyy-mm-dd']\n   --end_date value, -e value    End date of the time range to check. [Expected format: 'yyyy-mm-dd']\n   --print_json, --json          Define whether the output needs to be printed in json format. (default: false)\n   --help, -h                    show help (default: false)\n```\n\n## Usage of `release-report` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go release-report -h\nNAME:\n   main release-report - Retrieves the releases that were published and/or created within a time range for a repository and prints a report based on them.\n\nUSAGE:\n   main release-report [command options] [arguments...]\n\nOPTIONS:\n   --auth_token value, -t value                                  Github authorization token. (default: \"~\")\n   --owner value, -o value                                       Owner of the repository to use.\n   --repository value, -r value                                  Repository name to use.\n   --start_date value, -f value                                  Start date of the time range to check. [Expected format: 'yyyy-mm-dd']\n   --end_date value, -e value                                    End date of the time range to check. [Expected format: 'yyyy-mm-dd']\n   --default_version_pattern, --dvp                              Enables the default release version pattern to be used. (default pattern: ^(v[\\d]+.[\\d]+.[\\d]+)$) (default: false)\n   --version_pattern_with_service_initials value, --vpwsi value  Enables the release version pattern that uses the provided number of letters for service initials to be used. [pattern format: ^(v[\\d]+.[\\d]+.[\\d]+-(\\w){numOfInitialLetters,numOfInitialLetters})$] (default: 0)\n   --help, -h                                                    show help (default: false)\n```\n\n## Usage of `workflows` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go workflows -h\nNAME:\n   GitPullRequests workflows - Retrieves and prints the workflow executions of a repository.\n\nUSAGE:\n   GitPullRequests workflows command [command options] [arguments...]\n\nCOMMANDS:\n   runs, r      Retrieves and prints the runs of a repository for a given amount of time.\n   billable, b  Retrieves and prints summary of billing for all workflows of a repository duting the current billing cycle.\n   help, h      Shows a list of commands or help for one command\n\nOPTIONS:\n   --auth_token value, -t value  Github authorization token. (default: \"~\")\n   --owner value, -o value       Owner of the repository to use.\n   --repository value, -r value  Repository name to use.\n   --help, -h                    show help (default: false)\n```\n\n### Usage of `workflows runs` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go workflows -o owner -r repo runs -h\nNAME:\n   GitPullRequests workflows runs - Retrieves and prints the runs of a repository for a given amount of time.\n\nUSAGE:\n   GitPullRequests workflows runs [command options] [arguments...]\n\nOPTIONS:\n   --start_date value, -f value  Start date of the time range to check. [Expected format: 'yyyy-mm-dd']\n   --end_date value, -e value    End date of the time range to check. [Expected format: 'yyyy-mm-dd']\n   --page_size value, -s value   Size of each page to load. (default: 30)\n   --help, -h                    show help (default: false)\n```\n\n### Usage of `workflows billable` command\n\n```text\n[~/gitpr]$ go run cmd/gitpr/main.go workflows -o owner -r repo billable -h\nNAME:\n   GitPullRequests workflows billable - Retrieves and prints summary of billing for all workflows of a repository duting the current billing cycle.\n\nUSAGE:\n   GitPullRequests workflows billable [command options] [arguments...]\n\nOPTIONS:\n   --help, -h  show help (default: false)\n```\n\n----\n\n# Definition\n\n## Examples\n\n```shell\ngo run cmd/gitpr/main.go user-repos -t \u003cyour token\u003e\ngo run cmd/gitpr/main.go pull-requests -t \u003cyour token\u003e -o eujoy -r gitpr -a open\ngo run cmd/gitpr/main.go find -t \u003cyour token\u003e\ngo run cmd/gitpr/main.go commit-list -o eujoy -r gitpr -s \u003cfrom tag/commit\u003e -e \u003cuntil tag/commit\u003e\ngo run cmd/gitpr/main.go create-release -o eujoy -r gitpr -l \u003cprevious version\u003e -v \u003cnew version\u003e -d -f\ngo run cmd/gitpr/main.go create-release -o eujoy -r erbuilder -l v0.5.0 -v v0.7.5 -d -p \"app/service\"\ngo run cmd/gitpr/main.go pr-metrics -o eujoy -r erbuilder --start_date \"2021-01-01\" --end_date \"2021-03-05\"\ngo run cmd/gitpr/main.go release-report --o eujoy -r erbuilder --start_date \"2021-01-01\" --end_date \"2021-01-31\" --vpwsi 2\ngo run cmd/gitpr/main.go release-report --o eujoy -r erbuilder --start_date \"2021-01-01\" --end_date \"2021-01-31\" --dvp\ngo run cmd/gitpr/main.go release-report --o eujoy -r erbuilder --start_date \"2021-01-01\" --end_date \"2021-01-31\"\n```\n\n```shell\nhttp://localhost:9999/userRepos?authToken=\u003cyour token\u003e\u0026pageSize=10\u0026page=1\nhttp://localhost:9999/pullRequests?authToken=\u003cyour token\u003e\u0026repoOwner=\u003cowner\u003e\u0026repository=\u003csome repo\u003e\u0026prState=open\u0026baseBranch=master\u0026pageSize=10\u0026page=1\nhttp://localhost:9999/defaults\n```\n\n## Useful Links\n\n### Bitbucket API documentation\n\n- https://developer.atlassian.com/bitbucket/api/2/reference/\n- https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication\n- https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feujoy%2Fgitpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feujoy%2Fgitpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feujoy%2Fgitpr/lists"}