-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into editorconfig
Signed-off-by: Eric Nemchik <[email protected]>
- Loading branch information
Showing
56 changed files
with
2,213 additions
and
141 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 |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
cancel-in-progress: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
|
@@ -55,7 +55,7 @@ jobs: | |
cancel-in-progress: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected].2 | ||
uses: actions/[email protected].3 | ||
with: | ||
fetch-depth: 0 | ||
sparse-checkout: | | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
editorconfig-checker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected].2 | ||
- uses: actions/[email protected].3 | ||
- name: editorconfig-checker | ||
run: | | ||
docker run --rm \ | ||
|
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ jobs: | |
markdownlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected].2 | ||
- uses: actions/[email protected].3 | ||
- name: markdownlint | ||
run: | | ||
docker run --rm \ | ||
|
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 |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/[email protected].2 | ||
- uses: actions/[email protected].3 | ||
|
||
- name: Run yamllint | ||
run: | | ||
|
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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
name: Validate metadata.json | ||
steps: | ||
- uses: actions/[email protected].2 | ||
- uses: actions/[email protected].3 | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: 3.x | ||
|
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,38 @@ | ||
name: Pull Request Title Validation | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
|
||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
jobs: | ||
pull-request-title-validation: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Validate Pull Request Title | ||
id: check_title | ||
uses: actions/github-script@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const titleRegex = /^(Revert \")?(feat|fix|docs|style|refactor|perf|test|update|build|ci|chore)(\([\w\/-]+\))?:\s.+$/g; | ||
const title = context.payload.pull_request.title; | ||
const isValid = titleRegex.test(title); | ||
if (!isValid) { | ||
if ((context.payload.action === 'opened') || (context.payload.action === 'reopened')) { | ||
const prNumber = context.payload.pull_request.number; | ||
const author = context.payload.pull_request.user.login; | ||
const message = `@${author} your pull request title "${context.payload.pull_request.title}" does not conform to our [naming conventions](https://www.conventionalcommits.org/en/v1.0.0/).\n\nPlease update the title to match the pattern: "feat|build|chore|style|fix|update|ci(\\<area\\>): \\<description\\>\n\nYou can check your title at this [regex101 link](https://regex101.com/r/jOZ6kU/1)."`; | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: prNumber, | ||
body: message | ||
}); | ||
} | ||
core.setFailed(`PR title "${title}" doesn't match the required format.`) | ||
} |
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
Oops, something went wrong.