ci: release #18
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
name: Lint PR | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- edited | |
- synchronize | |
permissions: | |
pull-requests: write | |
jobs: | |
main: | |
name: Validate PR title | |
runs-on: ubuntu-latest | |
steps: | |
- uses: amannn/action-semantic-pull-request@v5 | |
with: | |
types: | | |
fix | |
feat | |
chore | |
docs | |
ci | |
test | |
revert | |
fix(prs) | |
fix(releases) | |
fix(tweets) | |
feat(prs) | |
feat(releases) | |
feat(tweets) | |
chore(prs) | |
chore(releases) | |
chore(tweets) | |
docs(prs) | |
docs(releases) | |
docs(tweets) | |
ci(prs) | |
ci(releases) | |
ci(tweets) | |
test(prs) | |
test(releases) | |
test(tweets) | |
revert(prs) | |
revert(releases) | |
revert(tweets) | |
id: lint_pr_title | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
# When the previous steps fails, the workflow would stop. By adding this | |
# condition you can continue the execution with the populated error message. | |
if: always() && (steps.lint_pr_title.outputs.error_message != null) | |
with: | |
header: pr-title-lint-error | |
message: | | |
Thank you for your pull request! 🚀 | |
The pull request titles need to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. | |
Required Format: `<type>(<scope>): <description>` | |
`<type>`: Indicates the kind of change you are making. Accepted types include: | |
- `fix`: Bug fixes. | |
- `feat`: New features. | |
- `chore`: Maintenance tasks. | |
- `docs`: Documentation updates. | |
- `ci`: CI related changes. | |
- `test`: Adding or updating tests. | |
- `revert`: Reverting changes. | |
`<scope>`: For this mono repo, required to specify which package is affected by this PR. Valid scopes are: | |
- `prs`: For `astro-loader-github-prs`. | |
- `releases`: For `astro-loader-github-releases`. | |
- `tweets`: For `astro-loader-tweets`. | |
- `bluesky`: For `astro-loader-bluesky-posts`. | |
Details: | |
``` | |
${{ steps.lint_pr_title.outputs.error_message }} | |
``` | |
# Delete a previous comment when the issue has been resolved | |
- if: ${{ steps.lint_pr_title.outputs.error_message == null }} | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
header: pr-title-lint-error | |
delete: true |