{"id":18623593,"url":"https://github.com/codica2/pull-request-best-practices","last_synced_at":"2025-10-27T12:12:06.430Z","repository":{"id":98303386,"uuid":"180800408","full_name":"codica2/pull-request-best-practices","owner":"codica2","description":"A simple list of recommendations of the pull request best practices ","archived":false,"fork":false,"pushed_at":"2019-04-12T13:13:56.000Z","size":172,"stargazers_count":32,"open_issues_count":0,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T09:01:38.558Z","etag":null,"topics":["best-practices","danger-bot","github","gitlab","policy","pull-request-template","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codica2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-04-11T13:40:54.000Z","updated_at":"2025-01-13T13:35:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f46c8af5-ea3a-45e1-9243-bebb07267b73","html_url":"https://github.com/codica2/pull-request-best-practices","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fpull-request-best-practices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fpull-request-best-practices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fpull-request-best-practices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fpull-request-best-practices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codica2","download_url":"https://codeload.github.com/codica2/pull-request-best-practices/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248335483,"owners_count":21086602,"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":["best-practices","danger-bot","github","gitlab","policy","pull-request-template","pull-requests"],"created_at":"2024-11-07T04:25:13.760Z","updated_at":"2025-10-27T12:12:06.419Z","avatar_url":"https://github.com/codica2.png","language":"Ruby","readme":"# Pull Request Best Practices\n\n![Pull Request](images/pull-request.jpg)\n\n## Description\n\nCode review is a very important part of the software development cycle. Pull requests are used to review code on branches before it reaches the master. Code review is also one of the most difficult and time-consuming parts of the software development process, often requiring experienced team members to spend time reading, thinking, evaluating, and responding to implementations of new features or systems.\n\nOur [Codica](https://github.com/codica2) team has developed a set of rules and templates to be followed and this page briefly explains the steps that a pull request usually follows.\n\n## Pull Request Policy\n\n### General\n\n* Always create and use [Pull Request templates for Gitlab](https://docs.gitlab.com/ee/user/project/description_templates.html#creating-merge-request-templates) or [templates for Github](https://help.github.com/en/articles/creating-a-pull-request-template-for-your-repository) for the repository you're working with.\n* In the PR title use tags `[Fix]`, `[Feature]`, `[Refactor]`, `[Release]`, `[Hotfix]`\n  \n  Example:\n\n  ```text\n  [Fix] Sitemap bug solved.\n  ```\n\n* PR description must include:\n  * Trello/Jira ticket URL;\n  * PR explanation and what it does;\n  * At least 2 code reviewers;\n* Always set a checkbox `Remove source branch when merge request is accepted.`\n\n### Automate Pull Request Validation\n\n* Be sure to configure [DangerBot](https://danger.systems/ruby/) to check the validity of your PRs\n\nYou must have at least:\n\n* Ticket link;\n* Description;\n* Reviewers.\n\nWe'll explain how to set up [DangerBot](https://danger.systems/ruby/) and provide a settings example below on this page.\n\n### One ticket = One Pull Request\n\n* One PR must contain changes corresponding to a single ticket;\n* In case when several tickets depend on each other, it makes sense to combine them into one.\n\n### Code Requirements\n\n* Be sure to cover your code with tests;\n* If your code affects the launch, testing or deployment of the application, be sure to update the `Readme.md`.\n\n## Pull Request Templates Setup\n\nWe're working with [Gitlab](https://about.gitlab.com/) so we'll shortly explain how to configure templates on it.\n\nCreate a new Markdown (.md) file inside the `.gitlab/merge_request_templates/ ` directory in your repository. Commit and push to your default branch.\n\nIt's pretty easy. You can get acquainted with our [Template example](.gitlab/merge_request_templates/Task.md) here and use it in your repository. The template is fully consistent with our Pull Request requirements, and we will continue to customize DangerBot according to them. \n\n## DangerBot Setup\n\nDanger runs during your CI process and gives teams the chance to automate common code review routine.\n\nThis provides another logical step in your build, through this Danger can help lint your rote tasks in daily code review.\n\nYou can use Danger to codify your team’s norms. Leaving humans to think about more important problems.\n\n### Installation\n\nDanger is Ruby gem that runs a `Dangerfile`. You set up a `Dangerfile` per project. The `Dangerfile` contains a collection of home-grown rules specific to your project.\n\nDanger should be installed via a Gemfile. Add gem `danger` to your Gemfile, then run bundle.\n\nYou can integrate Danger into your own project on any available CI service. It will run through the process with you if you run Danger init after installation.\n\nHere is a simple example of how to add rules to your `Dangerfile`:\n\n```ruby\nfailure 'Please add trello ticket to MR', sticky: true unless gitlab.mr_body.include?('https://trello.com/c/')\n```\n\nMore [Dangerfile](Dangerfile) settings for Gitlab.\n\nDangerBot in action:\n\n![danger-bot](images/danger-bot-example.jpg)\n\nYou can also visit [DangerBot official site](https://danger.systems/guides/getting_started.html) to get started with it.\n\n## License\n\nCopyright © 2015-2019 Codica. It is released under the [MIT License](https://opensource.org/licenses/MIT).\n\n## About Codica\n\n[![Codica logo](https://www.codica.com/assets/images/logo/logo.svg)](https://www.codica.com)\n\nWe love open source software! See [our other projects](https://github.com/codica2) or [hire us](https://www.codica.com/) to design, develop, and grow your product.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodica2%2Fpull-request-best-practices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodica2%2Fpull-request-best-practices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodica2%2Fpull-request-best-practices/lists"}