Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve template pr with suggestion title and add rule #526

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
## Infos

<!--

### Pull Request Title Convention

Natalie9 marked this conversation as resolved.
Show resolved Hide resolved
When creating a Pull Request, please follow the title convention. It is essential that the title conforms to the standard as it will be used in the library's changelog description.

> type(context): description

The types should be:
- feat: for new features
- fix: for bug fixes
- chore: for maintenance tasks
- major: for major changes that generate a new version

Example:
> feat(component): create link component

-->

[Task](https://juntossomosmais.monday.com/boards/XXX/pulses/XXX)

#### What is being delivered?
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: PR Title Check

on:
pull_request:
types: [opened, edited, synchronize]
Natalie9 marked this conversation as resolved.
Show resolved Hide resolved

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)\([a-zA-Z0-9_-]+\):\ .+$ ]]; then
Natalie9 marked this conversation as resolved.
Show resolved Hide resolved
echo "O título do Pull Request deve seguir a convenção: 'tipo(contexto): descrição'."
echo "Os tipos devem ser: feat, fix, chore, major."
echo "Exemplo de título correto: feat(component): create link component"
Natalie9 marked this conversation as resolved.
Show resolved Hide resolved
exit 1
fi
Loading