{"id":17977373,"url":"https://github.com/diegolnasc/gotcha","last_synced_at":"2025-07-26T03:07:20.379Z","repository":{"id":43674494,"uuid":"437914152","full_name":"diegolnasc/gotcha","owner":"diegolnasc","description":"A :robot: to improve pull request quality.","archived":false,"fork":false,"pushed_at":"2023-06-01T20:25:55.000Z","size":417,"stargazers_count":30,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T05:34:31.121Z","etag":null,"topics":["github-app","golang","pull-requests","quality","review"],"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/diegolnasc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-12-13T14:55:12.000Z","updated_at":"2024-01-16T07:39:47.000Z","dependencies_parsed_at":"2023-02-10T00:46:01.384Z","dependency_job_id":null,"html_url":"https://github.com/diegolnasc/gotcha","commit_stats":{"total_commits":36,"total_committers":4,"mean_commits":9.0,"dds":"0.13888888888888884","last_synced_commit":"0049df0237c11c62da524a6dd8ce17633ed91cd1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/diegolnasc/gotcha","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegolnasc%2Fgotcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegolnasc%2Fgotcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegolnasc%2Fgotcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegolnasc%2Fgotcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diegolnasc","download_url":"https://codeload.github.com/diegolnasc/gotcha/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diegolnasc%2Fgotcha/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267109973,"owners_count":24037629,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["github-app","golang","pull-requests","quality","review"],"created_at":"2024-10-29T17:27:35.022Z","updated_at":"2025-07-26T03:07:20.357Z","avatar_url":"https://github.com/diegolnasc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003e Gotcha Bot :robot: \u003c/h2\u003e\n\u003ch2 align=\"center\"\u003eA app to automate engineers tasks\u003c/h2\u003e\n\n[![go-doc](https://godoc.org/github.com/diegolnasc/gotcha?status.svg)](https://godoc.org/github.com/diegolnasc/gotcha)\n[![go-report](https://goreportcard.com/badge/github.com/diegolnasc/gotcha)](https://goreportcard.com/report/github.com/diegolnasc/gotcha)\n![license](https://img.shields.io/github/license/diegolnasc/gotcha?style=plastic)\n[![gotcha-release(latest)](https://img.shields.io/github/v/release/diegolnasc/gotcha?sort=semver\u0026style=plastic)](https://github.com/diegolnasc/gotcha/releases)\n\n---\n## What can :robot: do?\n\n\u003e *Gotcha*, is a app and works on fired events. For more details on a GitHub app, please check [here](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps).\n\nThe main _Gotcha's_ features are:\n\n- Ensure the **pull request** report (diff).\n- Ensure the **pull request** name pattern is valid.\n- Ensure the **pull request** labels are valid.\n- Ensure the **pull request** assigners are valid.\n- Ensure the **pull request** reviewers are valid.\n\n\n*Gotcha* implements the some of the features as a test suite. Therefore, adding a new functionality for validation is very simple and practical.\n\n## Examples :eye_speech_bubble:\n\n- **Pull Request Report**\n\n![pr-overview](docs/imgs/pr-overview.png)\n\n- **Pull Request Test Validator**\n\nFail\n\n![pr-name-pattern-fail](docs/imgs/pr-name-pattern-fail.png)\n\n---\n\nPass\n\n![pr-name-pattern-pass](docs/imgs/pr-name-pattern-pass.png)\n\n## How to install\n\n### GitHub app\nFirst, go to your profile *Settings* \u0026#8594; *Developer Settings*. Then create a GitHub app for *Gotcha* :smiley:.\n\nFill in the necessary information to create the app.  \n![install-1](docs/imgs/install-1.png)\n![install-2](docs/imgs/install-2.png)\n\n\u003e To test without hosting or exposing your application on the internet, a suggestion is to use https://smee.io\n\nNext, enable the following permissions:\n\n- Repository \u0026#8594; Checks\n- Repository \u0026#8594; Issues\n- Repository \u0026#8594; Pull requests\n- Repository \u0026#8594; Contents\n- Events \u0026#8594; Check run\n- Events \u0026#8594; Issue comment\n- Events \u0026#8594; Issues\n- Events \u0026#8594; Pull request\n- Events \u0026#8594; Pull request review comment\n- Events \u0026#8594; Pull request review\n\n\u003e It's worth noting that the permissions listed are *Gotcha's* default ones. If you are not interested in using some functionality or have another need, customize the permissions.\n\nFinally, save the settings and \"install\" it in your profile.\nAfterwards, generate a private key for the bot.\n\n### Gotcha Settings\n\nIn the *build* folder, you will find a file called **config.yaml** which is intended to configure some _Gotcha's_ features.\n\n- In **Layout**, you'll find general *Gotcha* settings.\n- In **GitHub**, you'll find general GitHub settings.\n\n**Layout**: \n\n| Level                                                  | Description                                                                                                                                                                                           | Type          | Default                                                                                                        |\n|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------|----------------------------------------------------------------------------------------------------------------|\n| administration \u0026#8594; permission                      | Users who are allowed to execute commands such as pull request approval, test re-runs and others. \u003cbr/\u003e The permissions here are one level above the *repositories* item, so they overlap the others. | list(string)  | None                                                                                                           |\n| administration \u0026#8594; permission \u0026#8594; repositories | Users with permissions on certain repositories.                                                                                                                                                       | list(object)  | None                                                                                                           |\n| pullRequest \u0026#8594; enableOverview                     | Enable pull request report (commits, diff, additions, deletes, extensions) overview.                                                                                                                  | bool          | true                                                                                                           |\n| pullRequest \u0026#8594; overViewCommand                    | Command to re-run the pull request overview. The _enableOverview_ must be true.                                                                                                                       | string        | run overview                                                                                                   |\n| pullRequest \u0026#8594; approveCommand                     | Command for approval of the PR by *Gotcha*.                                                                                                                                                           | string        | lgtm                                                                                                           |\n| pullRequest \u0026#8594; runTestSuiteCommand                | Command to re-run the test suite.                                                                                                                                                                     | string        | run testsuite                                                                                                  |\n| pullRequest \u0026#8594; mergeCommand                       | Command for merge of the PR by *Gotcha*.                                                                                                                                                              | string        | merge                                                                                                          |\n| pullRequest \u0026#8594; mergeAndDeleteCommand              | Command for merge and delete ref branch of the PR by *Gotcha*.                                                                                                                                        | string        | merge and delete                                                                                               |\n| pullRequest \u0026#8594; testSuite \u0026#8594; namePattern      | Format (regex) that pull request name must follow.\u003cbr/\u003e Default value is based on [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).                                             | string(regex) | (?P\u003ctype\u003efeat\u0026#124;fix\u0026#124;refactor\u0026#124;style\u0026#124;docs\u0026#124;build\u0026#124;chore)(?P\u003cseparator\u003e:) (?P\u003cbody\u003e.+)' |\n| pullRequest \u0026#8594; testSuite \u0026#8594; reviewers        | Need to have reviewers on the pull request.                                                                                                                                                           | bool          | false                                                                                                          |\n| pullRequest \u0026#8594; testSuite \u0026#8594; assignees        | Need to have assignees on the pull request.                                                                                                                                                           | bool          | true                                                                                                           |\n| pullRequest \u0026#8594; testSuite \u0026#8594; labels           | Need to have labels on the pull request.                                                                                                                                                              | bool          | true                                                                                                           |\n\n\n**Github**:\n\n| Level              | Description                                               | Type         | Default                                                                                              |\n|--------------------|-----------------------------------------------------------|--------------|------------------------------------------------------------------------------------------------------|\n| appId              | GitHub App Id.                                            | int          | None(required)                                                                                       |\n| organization       | Name of the organization that *Gotcha* will be installed. | string       | None                                                                                                 |\n| user               | Name of the user that *Gotcha* will be installed.         | string       | None                                                                                                 |\n| webhookSecret      | Webhook secret.                                           | string       | None(required)                                                                                       |\n| privateKeyLocation | Private key location.                                     | string       | None                                                                                                 |\n| privateKey         | Private key value.                                        | string       | None                                                                                                 |\n| events             | List of events that *Gotcha* will listen to.              | list(string) | issue \u003cbr/\u003e pull_request \u003cbr/\u003e pull_request_review_comment \u003cbr/\u003e pull_request_review \u003cbr/\u003e check_run |\n\n\n## Contributing\nGotcha is an open source bot made to facilitate developers' daily lives. Thus, all features are open to be modified and/or added.\n\u003cp align=\"center\"\u003e Please feel free to help!  \u003c/p\u003e\n\n\u003cp align=\"center\"\u003e For more details, see our \u003ca href=\"CONTRIBUTING.md\"\u003e guide.\u003c/a\u003e\u003c/p\u003e \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegolnasc%2Fgotcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegolnasc%2Fgotcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegolnasc%2Fgotcha/lists"}