Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Pull Request Validation

paulomeurerzup edited this page Jan 11, 2021 · 7 revisions

This process is responsible for validating all PRs opened for Beagle. The purpose of this workflow is verify if the pull request complies with all established rules to collaborate with Beagle.

Workflow

This workflow will be executed every time a pull request event occurs in master branch.

You can see it more detailed in the workflow file.

Step by step

This workflow defines a job called danger-pr witch contains the following steps:

1. Load fastlane dependencies cache

It uses the github action cache for caching fastlane dependencies and build outputs to improve workflow execution time.

2. Install fastlane

Installs fastlane and its plugins.

3. Execute fastlane run_danger lane

Execute the run_danger lane from fastlane using pr Dangerfile.

For every pull request the Dangerfile:

  • Checks if the title contains the text [WIP] or if any PR label contains the text WIP. In this case, it issues an alert saying: PR is classed as Work in Progress
  • Checks the number of lines changed in the PR. If the number of lines is greater than 300, it issues an alert saying: Big PR
  • Checks if the number of lines changed in the PR is greater than 10 and if the description of the PR is less than two characters. In this case, issue an alert: Please provide a summary in the Pull Request description
  • Checks whether the PR title follows the semantic specification of Conventional Commits. If not, it fails with the following message: The title of PR does not follow the rules of: https://www.conventionalcommits.org/en/v1.0.0/