{"id":13509132,"url":"https://github.com/reviewpad/reviewpad","last_synced_at":"2025-05-16T14:05:28.191Z","repository":{"id":37081713,"uuid":"496935038","full_name":"reviewpad/reviewpad","owner":"reviewpad","description":"Next generation pull requests and issues 🦄","archived":false,"fork":false,"pushed_at":"2025-05-06T03:04:59.000Z","size":2256,"stargazers_count":199,"open_issues_count":39,"forks_count":30,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T04:20:45.163Z","etag":null,"topics":["automation-framework","github","go","golang","issue-automation","product","pull-request-review","pull-requests","service"],"latest_commit_sha":null,"homepage":"https://reviewpad.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reviewpad.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-27T09:21:44.000Z","updated_at":"2025-04-14T12:34:52.000Z","dependencies_parsed_at":"2023-10-23T13:39:57.874Z","dependency_job_id":"e9dc831d-5184-49eb-9d7a-6cab18fd785e","html_url":"https://github.com/reviewpad/reviewpad","commit_stats":{"total_commits":796,"total_committers":19,"mean_commits":41.89473684210526,"dds":0.6306532663316583,"last_synced_commit":"c8210601dd3643095469379a0c915e884b07ad88"},"previous_names":[],"tags_count":79,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewpad%2Freviewpad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewpad%2Freviewpad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewpad%2Freviewpad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reviewpad%2Freviewpad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reviewpad","download_url":"https://codeload.github.com/reviewpad/reviewpad/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"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","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-framework","github","go","golang","issue-automation","product","pull-request-review","pull-requests","service"],"created_at":"2024-08-01T02:01:03.391Z","updated_at":"2025-05-16T14:05:28.160Z","avatar_url":"https://github.com/reviewpad.png","language":"Go","funding_links":[],"categories":["Go","golang"],"sub_categories":[],"readme":"## This project is now in maintenance mode. Please feel free to fork the project to apply any changes you might want to make.\n\n![Reviewpad](https://github.com/reviewpad/reviewpad/assets/38539/5220e087-e15f-423f-a509-20a7485ff7f7)\n\n# Reviewpad\n\n[![x-ray-badge](https://img.shields.io/badge/Time%20to%20Merge-Fair%20team-bb3e03?link=https://xray.reviewpad.com/analysis?repository=https%3A%2F%2Fgithub.com%2Freviewpad%2Freviewpad\u0026style=plastic.svg)](https://xray.reviewpad.com/analysis?repository=https%3A%2F%2Fgithub.com%2Freviewpad%2Freviewpad) [![Build](https://github.com/reviewpad/reviewpad/actions/workflows/build.yml/badge.svg)](https://github.com/reviewpad/reviewpad/actions/workflows/build.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/reviewpad/reviewpad)](https://goreportcard.com/report/github.com/reviewpad/reviewpad)\n\n## Welcome to Reviewpad!\n\nFor **questions**, check out the GitHub [discussions](https://github.com/reviewpad/reviewpad/discussions).\n\nFor **documentation**, check out this document and the [official documentation](https://docs.reviewpad.com).\n\n**Join our community on [Discord](https://reviewpad.com/discord)!**\n\nTo start using Reviewpad, check out our [website](https://reviewpad.com).\n\n## What is Reviewpad?\n\nReviewpad is a service to automate pull requests and issues workflows.\n\nThe workflows are specified in a YML-based configuration language described in the [official documentation](https://docs.reviewpad.com/guides/syntax).\n\nIn Reviewpad, you can automate actions over the pull requests and issues such as:\n\n1. Automated [comments](https://docs.reviewpad.com/use-cases/comment-on-pull-requests);\n2. Add or remove [labels](https://docs.reviewpad.com/use-cases/automated-labelling/);\n3. Specify [reviewer assignments](https://docs.reviewpad.com/use-cases/reviewer-assignment);\n4. Automate [close/merge actions](https://docs.reviewpad.com/use-cases/auto-merge);\n5. [Block the merge action](https://docs.reviewpad.com/use-cases/blocking-merge);\n6. Automatically [summarize pull requests](https://docs.reviewpad.com/guides/built-ins#summarize);\n\nAs an example, the following workflow:\n\n```yml\nlabels:\n  ship:\n    description: Ship mode\n    color: \"#76dbbe\"\n\nworkflows:\n  - name: ship\n    description: Ship process - bypass the review and merge with rebase\n    run:\n      - if: $hasFileExtensions([\".md\"])\n        then:\n          - $addLabel(\"ship\")\n          - $merge()\n```\n\nAutomatically adds the label `ship` and merges all pull requests that only change `.md` files.\n\nYou can execute Reviewpad through the CLI or install Reviewpad [GitHub App](https://github.com/marketplace/reviewpad).\n\n## Architecture\n\nThis repository generates two artifacts:\n\n1. CLI [cli](cli/main.go) that runs Reviewpad open source edition.\n2. Reviewpad library packages:\n    - github.com/reviewpad/reviewpad/collector\n    - github.com/reviewpad/reviewpad/engine\n    - github.com/reviewpad/reviewpad/lang/aladino\n    - github.com/reviewpad/reviewpad/plugins/aladino\n    - github.com/reviewpad/reviewpad/utils\n\nConceptually, the packages are divided into four categories:\n\n1. Engine: The engine is the package responsible for processing the YML file. This process is divided into two stages:\n    - Process the YML file to determine which workflows are enabled. The outcome of this phase is a program with the actions that will be executed over the pull request.\n    - Execution of the synthesised program.\n2. [Aladino Language](https://docs.reviewpad.com/guides/aladino-language): This is the language that is used in the `spec` property of the rules and also the actions of the workflows. The engine of Reviewpad is not specific to Aladino - this means that it is possible to add support for a new language such as `Javascript` or `Golang` in these specifications.\n3. Plugins: The plugin package contains the built-in functions and actions that act as an abstraction to the 3rd party services such as GitHub, Jira, etc. This package is specific to each supported specification language. In the case of `plugins/aladino`, it contains the implementations of the [built-ins](https://docs.reviewpad.com/guides/built-ins).\n4. Utilities: packages, such as the collector, that provide utilities that are used in multiple places.\n\n## Development\n\n### Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n-   [Go](https://golang.org/doc/install) with the minimum version of 1.16.\n-   [goyacc](https://pkg.go.dev/golang.org/x/tools/cmd/goyacc) used to generate Reviewpad Aladino parser (`go install golang.org/x/tools/cmd/goyacc@master`).\n-   [libgit2](https://github.com/libgit2/libgit2) with version v1.2.\n-   To run the tests, Reviewpad requires the following environment variables:\n     - `INPUT_SEMANTIC_SERVICE`. You can do this by running the following command in your terminal: `export INPUT_SEMANTIC_SERVICE=\"0.0.0.0:3006\"`.\n     - `INPUT_ROBIN_SERVICE`. You can do this by running the following command in your terminal: `export INPUT_ROBIN_SERVICE=\"0.0.0.0:3011\"`.\n     - `INPUT_CODEHOST_SERVICE`. You can do this by running the following command in your terminal: `export INPUT_CODEHOST_SERVICE=\"0.0.0.0:3004\"`.\n\n### Compilation\n\nWe use [Taskfile](https://taskfile.dev/). To compile the packages simply run:\n\n```sh\ntask build\n```\n\nTo generate the CLI run:\n\n```sh\ntask build-cli\n```\n\nThis command generates the binary `reviewpad-cli` which you can run to try Reviewpad directly.\n\nThe CLI has the following argument list:\n\n```sh\n./reviewpad-cli\nreviewpad-cli is command line interface to run reviewpad commands.\n\nUsage:\n  reviewpad-cli [command]\n\nAvailable Commands:\n  check       Check if input reviewpad file is valid\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n  run         Runs reviewpad\n\nFlags:\n  -f, --file string   input reviewpad file\n  -h, --help          help for reviewpad-cli\n\nUse \"reviewpad-cli [command] --help\" for more information about a command.\n```\n\n### Running unit tests\n\nRun the tests with:\n\n```\ntask test\n```\n\nIf you get the error:\n\n```\npanic: httptest: failed to listen on a port: listen tcp6 [::1]:0: socket: too many open files [recovered]\n        panic: httptest: failed to listen on a port: listen tcp6 [::1]:0: socket: too many open files\n```\n\nYou can solve with:\n\n```\nulimit -Sn 500\n```\n\n#### Coverage\n\nTo generate the coverage report run:\n\n```\ntask test\n```\n\nTo display the code coverage for every package run:\n\n```\ngo tool cover -func coverage.out\n```\n\nTo display the total code coverage percentage run:\n\n```\ngo tool cover -func coverage.out | grep total:\n```\n\n### Running integration tests\n\nThe integration tests run Reviewpad on an actual repository and pull request. The repository where the integration tests run requires the following setup:\n\n- At least one milestone;\n- At least 3 labels named `bug`, `documentation`, `wontfix` (GitHub adds these labels to every new repository by default);\n- A team called `integration-test` with at least 3 members;\n- A project called `[INTEGRATION TESTS] Reviewpad` with `Todo` and `In Progress` status\n- A GitHub status check called `log event`.\n\n#### Required Environment Variables\n\n- `GITHUB_INTEGRATION_TEST_TOKEN` : GitHub access token used to setup tests and run Reviewpad\n- `GITHUB_INTEGRATION_TEST_REPO_OWNER` : The owner of the repository used to run integration tests on\n- `GITHUB_INTEGRATION_TEST_REPO_NAME` : The name of the repository used to run integration tests on\n\nAfter setting these variables, you can run the integration tests with:\n\n```\ntask integration-test\n```\n\n### VSCode\n\nWe strongly recommend using [VSCode](https://code.visualstudio.com/) with the following extensions:\n\n-   [Go](https://marketplace.visualstudio.com/items?itemName=golang.go) for Go language support.\n-   [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) to helps to maintain consistent coding styles.\n-   [licenser](https://marketplace.visualstudio.com/items?itemName=ymotongpoo.licenser) for adding license headers.\n-   [YAML](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) for enabling `reviewpad.yml` JSON schema.\n-   [JSON Parse \u0026 Stringify](https://marketplace.visualstudio.com/items?itemName=nextfaze.json-parse-stringify) for formatting JSON files.\n\nOpen the project in VSCode, open the command palette (Ctrl+Shift+P) and search for `Preferences: Open Workspace Settings (JSON)`.\n\nPaste the following configuration:\n\n```json\n{\n    // Licenser configuration\n    \"licenser.license\": \"Custom\",\n    \"licenser.author\": \"Explore.dev, Unipessoal Lda\",\n    \"licenser.customHeader\": \"Copyright (C) @YEAR@ @AUTHOR@ - All Rights Reserved\\nUse of this source code is governed by a license that can be\\nfound in the LICENSE file.\",\n    // Associate Reviewpad schema to reviewpad.(yml|yaml) files\n    \"yaml.schemas\": {\n        \"https://raw.githubusercontent.com/reviewpad/schemas/main/latest/schema.json\": [\n            \"reviewpad.yml\",\n        ]\n    },\n    // Go configuration\n    \"go.testFlags\": [\n        \"integration\"\n    ],\n    \"go.buildFlags\": [\n        \"-tags=integration\"\n    ],\n}\n```\n\n### Debugging with VSCode\n\nAdd the following to your `.vscode/launch.json`.\n\n```json\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Launch CLI\",\n            \"type\": \"go\",\n            \"request\": \"launch\",\n            \"mode\": \"debug\",\n            \"args\": [\n                \"run\",\n                // Flag to run on dry run (optional. Default is false)\n                \"-d\",\n                // Flag to run on safe mode (optional. Default is false)\n                \"-s\",\n                // Flag to define the log level (optional. Default is debug)\n                \"-l=debug\",\n                // GiHub personal access token.\n                // To generate a token, go to https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.\n                \"-t=\u003cGIT_HUB_TOKEN\u003e\",\n                // Absolute path to reviewpad.yml file to run.\n                \"-f=\u003cPATH_TO_REVIEWPAD_FILE\u003e\",\n                // GitHub URL of the pull request / issue.\n                // The reviewpad.yml file provided with the -f flag will run against this pull request / issue.\n                // This URL should be same the URL of the pull request / issues in the GitHub event provided with the -e flag.\n                // For instance, if you are using a GitHub event of a comment on the pull request X, the -u flag should be the URL of the pull request X.\n                \"-u=\u003cGITHUB_URL\u003e\",\n                // Absolute path to JSON file with GitHub event.\n                // This GitHub event body defines the action that will run on the pull request / issue.\n                // To get the GitHub event body, follow the instructions on https://github.com/reviewpad/reviewpad#how-to-get-the-github-event-body-internal-use-only\n                \"-e=\u003cPATH_TO_GITHUB_EVENT_BODY\u003e\"\n                // The GitHub event type\n                // Determines how the events JSON file will be processed\n                // To get the GitHub event body, follow the instructions on https://github.com/reviewpad/reviewpad#how-to-get-the-github-event-type-internal-use-only\n                \"-y=\u003cGITHUB_EVENT_TYPE\u003e\"\n            ],\n            \"env\": {\n                \"INPUT_CODEHOST_SERVICE\": \"\u003cCODEHOST_SERVICE_ENDPOINT\u003e\",\n                \"INPUT_SEMANTIC_SERVICE\": \"\u003cSEMANTIC_SERVICE_ENDPOINT\u003e\",\n                \"INPUT_ROBIN_SERVICE\": \"\u003cROBIN_SERVICE_ENDPOINT\u003e\",\n            },\n            \"program\": \"${workspaceFolder}/cli/main.go\"\n        }\n    ]\n}\n```\n\n#### How to get the GitHub event body (internal use only)\n\nThe `-e` flag is mandatory to run the debugger.\n\nIt represents the GitHub event that you wish to run the reviewpad.yml file against.\n\nTo extract a GitHub event, please follow the steps below:\n\n1. Navigate to the GitHub URL of the pull request you want to test against.\n2. Click on the `reviewpad` check under the `Checks` tab.\n3. From the `DETAILS` section of the check copy the `Delivery ID`.\n4. Go to the logs of the Entry Gate and filter out the logs using the query `{$.delivery_id=\"[Delivery ID]\" \u0026\u0026 $.msg=\"request received\"}`\n5. Copy the content inside the `body` field.\n6. Create a file under `cli \u003e debugdata` with a name that ends with `.json` (e.g. `my_event.json`) and paste the content inside the file.\n7. This content is an escape JSON string. Use the [JSON Parse \u0026 Stringify](https://marketplace.visualstudio.com/items?itemName=nextfaze.json-parse-stringify) extension to parse the content by pressing `Ctrl+Shift+P` and searching for `JSON: Parse Stringified JSON`.\n8. Update the argument `-e` to point to the full path of the file you just created.\n\n#### How to get the GitHub event type (internal use only)\n\nThe `-y` flag is mandatory to run the debugger.\n\nIt represents the type of GitHub event that you wish to run the reviewpad.yml file against.\n\nTo get the GitHub event type, please follow the steps below:\n\n1. Navigate to the GitHub URL of the pull request you want to test against.\n2. Click on the `reviewpad` check under the `Checks` tab.\n3. From the `DETAILS` section of the check copy the `Event Type`.\n4. Paste the content inside the `-y` flag.\n\nIf you wish to use the logs of the Entry Gate to the event type, please follow the steps below:\n\n1. Filter out the logs using the query `{$.delivery_id=\"[Delivery ID]\" \u0026\u0026 $.msg=\"request received\"}`\n2. Copy the content inside the `headers.X-GitHub-Event` field.\n3. Paste the content inside the `-y` flag.\n\n### Contributing\n\nWe welcome contributions to Reviewpad from the community!\n\nSee the [Contributing Guide](CONTRIBUTING.md).\n\nIf you need any assistance, please join [discord](https://reviewpad.com/discord) to reach the core contributors.\n\n## License\n\nReviewpad is available under the GNU Lesser General Public License v3.0 license.\n\nSee [LICENSE](./LICENSE.md) for the full license text.\n\n## Compliance\n\n\u003ca href=\"https://drata.com/soc-2?utm_source=soc2badge\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.drata.com/badge/soc2-light.png\" height=\"120\" /\u003e\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewpad%2Freviewpad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freviewpad%2Freviewpad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freviewpad%2Freviewpad/lists"}