Skip to content

Commit

Permalink
ci: create a job to validate the PR title (#2580)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

Create a workflow with a job to validate PR title. The title should
follow the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.

Available types:
```
 - fix
 - feat
 - chore
 - docs
 - style
 - refactor
 - test
 - ci
```


## How it works?
![Captura de Tela 2024-12-03 às 14 35
33](https://github.com/user-attachments/assets/b9fa7903-71c3-415e-9c4b-2f4c5ddea05b)


## How to test it?

Change the title of this PR and refresh the page. When I update the
title, I need to refresh the page to see the job running again. It looks
like a visual issue.
  • Loading branch information
pedromtec authored Dec 9, 2024
1 parent 4358b6e commit 66e2cf9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
**PR Title and Commit Messages**

- [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor` and `test`
- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor`, `ci` and `test`

**PR Description**

Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Lint PR"

on:
pull_request:
types: [opened, reopened, edited, synchronize]

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
with:
scopes: |
core
ui
api
components
sdk
shared
eslint-config
lighthouse
graphql-utils
types: |
fix
feat
chore
docs
style
refactor
test
ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 66e2cf9

Please sign in to comment.