From 3da6b20b9f06784d238f318dad45239e79db2cc5 Mon Sep 17 00:00:00 2001 From: Jan Amann Date: Tue, 21 Mar 2023 09:59:12 +0100 Subject: [PATCH] docs: README improvements --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CONTRIBUTORS.md | 2 +- README.md | 38 ++++++++++++++++---------------- action.yml | 2 +- package.json | 2 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index f2d643e8a..2ccb6ff76 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,6 @@ Thank you very much for contributing to this project! Please make sure to have a look at the [contributors guide](/~https://github.com/amannn/action-semantic-pull-request/blob/master/CONTRIBUTORS.md) so you can test your changes. -For any non-trivial changes, please include a link to a workflow where you tested the current state of this pull request (see contributors guide). +For any non-trivial changes, please include a link to a workflow where you've tested the current state of this pull request (see contributors guide). --> diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 60eef1f93..09736f283 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -13,5 +13,5 @@ To do this, please follow this process: 1. Fork the repo. 2. Create a PR in **your own repo**. 3. The "Lint PR title preview (current branch)" workflow will run the new version and will help you validate the change. -4. Create a PR to this repo with the changes. In this case the preview workflow will fail, but we'll know that it works since you tested it in the fork. Please include a include a link to a workflow where you tested the current state of this pull request. +4. Create a PR to this repo with the changes. In this case the preview workflow will fail, but we'll know that it works since you've tested it in the fork. Please include a include a link to a workflow where you've tested the current state of this pull request. 5. Don't run `npm run build` to update the `dist` folder as it will be generated on CI during the build diff --git a/README.md b/README.md index 408a3e57c..6701c6964 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,18 @@ # action-semantic-pull-request -This is a [GitHub Action](/~https://github.com/features/actions) that ensures your PR title matches the [Conventional Commits spec](https://www.conventionalcommits.org/). +This is a GitHub Action that ensures your PR title matches the [Conventional Commits spec](https://www.conventionalcommits.org/). The typical use case is to use this in combination with a tool like [semantic-release](/~https://github.com/semantic-release/semantic-release) to automate releases. -The typical use case is to use this in combination with a tool like [semantic-release](/~https://github.com/semantic-release/semantic-release) to automate releases. +Used by: [Apache](/~https://github.com/apache/pulsar) · [Vercel](/~https://github.com/vercel/ncc) · [Microsoft](/~https://github.com/microsoft/SynapseML) · [Firebase](/~https://github.com/firebase/flutterfire) · [AWS](/~https://github.com/aws-ia/terraform-aws-eks-blueprints) · [Electron](/~https://github.com/electron/forge) – and many more. -## Validation +## Examples -Examples for valid PR titles: -- fix: Correct typo. -- feat: Add support for Node 12. -- refactor!: Drop support for Node 6. -- feat(ui): Add `Button` component. +**Valid PR titles:** +- fix: Correct typo +- feat: Add support for Node.js 18 +- refactor!: Drop support for Node.js 12 +- feat(ui): Add `Button` component -Note that since PR titles only have a single line, you have to use the `!` syntax for breaking changes. +Note that since PR titles only have a single line, you have to use `!` to indicate breaking changes. See [Conventional Commits](https://www.conventionalcommits.org/) for more examples. @@ -47,7 +47,7 @@ The action works without configuration, however you can provide options for cust The following terminology helps to understand the configuration options: ``` -feat(ui): Add `Button` component. +feat(ui): Add `Button` component ^ ^ ^ | | |__ Subject | |_______ Scope @@ -56,12 +56,12 @@ feat(ui): Add `Button` component. ```yml with: - # Configure which types are allowed (newline delimited). + # Configure which types are allowed (newline-delimited). # Default: /~https://github.com/commitizen/conventional-commit-types types: | fix feat - # Configure which scopes are allowed (newline delimited). + # Configure which scopes are allowed (newline-delimited). # These are regex patterns auto-wrapped in `^ $`. scopes: | core @@ -69,9 +69,9 @@ feat(ui): Add `Button` component. JIRA-\d+ # Configure that a scope must always be provided. requireScope: true - # Configure which scopes (newline delimited) are disallowed in PR - # titles. For instance by setting # the value below, `chore(release): - # ...` and `ci(e2e,release): ...` will be rejected. + # Configure which scopes are disallowed in PR titles (newline-delimited). + # For instance by setting the value below, `chore(release): ...` (lowercase) + # and `ci(e2e,release): ...` (unknown scope) will be rejected. # These are regex patterns auto-wrapped in `^ $`. disallowScopes: | release @@ -88,10 +88,10 @@ feat(ui): Add `Button` component. doesn't start with an uppercase character. # If you use GitHub Enterprise, you can set this to the URL of your server githubBaseUrl: https://github.myorg.com/api/v3 - # If the PR contains one of these labels (newline delimited), the - # validation is skipped. - # If you want to rerun the validation when labels change, you might want - # to use the `labeled` and `unlabeled` event triggers in your workflow. + # If the PR contains one of these newline-delimited labels, the + # validation is skipped. If you want to rerun the validation when + # labels change, you might want to use the `labeled` and `unlabeled` + # event triggers in your workflow. ignoreLabels: | bot ignore-semantic-pull-request diff --git a/action.yml b/action.yml index 1a29a560a..640c6a2e5 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: semantic-pull-request -author: Jan Amann +author: Jan Amann description: Ensure your PR title matches the Conventional Commits spec (https://www.conventionalcommits.org/). runs: using: 'node16' diff --git a/package.json b/package.json index d61033de0..9704bd902 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "github-action", "conventional-commits" ], - "author": "Jan Amann ", + "author": "Jan Amann ", "license": "MIT", "bugs": { "url": "/~https://github.com/amannn/action-semantic-pull-request/issues"