-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Check for linked issue | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
check-linked-issue: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check if PR has linked issue | ||
id: check_issue | ||
run: | | ||
issue_pattern='#[0-9]+' | ||
if [[ "${{ github.event.pull_request.body }}" =~ $issue_pattern ]]; then | ||
echo "Issue linked in PR description." | ||
else | ||
echo "::error::No issue linked! Please link to an issue using '#<issue_number>' or create a new issue." | ||
exit 1 | ||
fi | ||
- name: Post comment on PR (if no issue linked) | ||
if: failure() | ||
uses: actions-ecosystem/action-create-comment@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
number: ${{ github.event.pull_request.number }} | ||
body: | | ||
⚠️ Poxa @${{ github.actor }}, parece que não temos nenhuma issue vinculada a este PR. Para facilitar para todas as pessoas contribuidoras e mantenedoras desse projeto, além da organização, por favor, vincule uma issue a esse PR incluindo #<número_da_issue> na descrição do PR ou crie uma nova issue e atualize o PR. Se precisar de qualquer ajuda para isso, pode chamar a @levxyca 💙🫰🏻 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: json-yaml-validate | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write # enable write permissions for pull request comments | ||
|
||
jobs: | ||
json-yaml-validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: json-yaml-validate | ||
id: json-yaml-validate | ||
uses: GrantBirki/json-yaml-validate@v3.2.1 # replace with the latest version | ||
with: | ||
base_dir: assets/data # base directory to search for files | ||
comment: "true" # enable comment mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters