diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c7a5a0e41..68b723a8f 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,26 @@ ## Infos + + [Task](https://juntossomosmais.monday.com/boards/XXX/pulses/XXX) #### What is being delivered? diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml new file mode 100644 index 000000000..296566d06 --- /dev/null +++ b/.github/workflows/pr-title-check.yml @@ -0,0 +1,22 @@ +name: PR Title Check + +on: + pull_request: + types: [opened] + +jobs: + pr-title: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Validate PR Title + run: | + if [[ ! "${{ github.event.pull_request.title }}" =~ ^(feat|fix|chore|major|docs|ci))\([a-zA-Z0-9_-]+\):\ .+$ ]]; then + echo "The Pull Request title must follow the convention: 'type(context): description'." + "The types must be: feat, fix, chore, major." + echo "Example of a correct title: feat(component): create link component" + exit 1 + fi