diff --git a/.github/workflows/cpr.yml b/.github/workflows/cpr.yml index 1661153..7c14808 100644 --- a/.github/workflows/cpr.yml +++ b/.github/workflows/cpr.yml @@ -12,3 +12,4 @@ jobs: with: access_token: ${{ secrets.ACCESS_TOKEN }} edit: true + verbose: true diff --git a/README.md b/README.md index 7a84884..503ce63 100644 --- a/README.md +++ b/README.md @@ -236,24 +236,24 @@ Filling the input with zero will disable this validator. You can customize this actions with these following options (fill it on `with` section): -| **Name** | **Required?** | **Default Value** | **Description** | -| --------------------- | ------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `access_token` | `true` | | [GitHub access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) to interact with the GitHub API. It is recommended to store this token with [GitHub Secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets). **To support automatic close, labeling, and comment report, please grant a write access to the token** | -| `close` | `false` | `true` | Immediately close invalid pull request. | -| `message` | `false` | `''` | Extra message to be posted when the pull request is invalid. | -| `label` | `false` | `''` | Invalid pull requests label. Fill with an empty string to disable labeling. | -| `draft` | `false` | `true` | Skip pull request validation if the pull request is a draft. | -| `strict` | `false` | `true` | Enforce validation rules to repository administrators. | -| `bot` | `false` | `true` | Skip pull request validation if the author is a bot. | -| `title_pattern` | `false` | `([\w\-]+)(\([\w\-]+\))?!?: [\w\s:\-]+` | Valid pull request title regex pattern in Perl syntax. Defaults to the [conventional commit style](https://www.conventionalcommits.org/en/v1.0.0/) commit messages. Fill with an empty string to disabled pull request title validation. | -| `commit_pattern` | `false` | `''` | Valid pull request commit messages regex pattern in Perl syntax. Fill with an empty string to disabled commit message validation. | -| `branch_pattern` | `false` | `''` | Valid pull request branch name regex pattern in Perl syntax. Fill with an empty string to disabled branch name validation. | -| `body` | `false` | `true` | Require all pull request to have a non-empty body. | -| `issue` | `false` | `true` | Require all pull request to reference an existing issue. | -| `maximum_changes` | `false` | `0` | Limits file changes per one pull request. Fill with zero to disable this feature. | -| `ignored_users` | `false` | `''` | GitHub usernames to be whitelisted from pull request validation. Must be a comma-separated string. Example: `Namchee, foo, bar` will bypass pull request validation for users `Namchee`, `foo`, `bar`. Case-sensitive. -| `verbose` | `false` | `false` | Post validation report on every pull request validation flow. -| `edit` | `false` | `false` | Edit existing validation report instead of submitting a new comment. +| **Name** | **Required?** | **Default Value** | **Description** | +| ----------------- | ------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `access_token` | `true` | | [GitHub access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) to interact with the GitHub API. It is recommended to store this token with [GitHub Secrets](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets). **To support automatic close, labeling, and comment report, please grant a write access to the token** | +| `close` | `false` | `true` | Immediately close invalid pull request. | +| `message` | `false` | `''` | Extra message to be posted when the pull request is invalid. | +| `label` | `false` | `''` | Invalid pull requests label. Fill with an empty string to disable labeling. | +| `draft` | `false` | `true` | Skip pull request validation if the pull request is a draft. | +| `strict` | `false` | `true` | Enforce validation rules to repository administrators. | +| `bot` | `false` | `true` | Skip pull request validation if the author is a bot. | +| `title_pattern` | `false` | `([\w\-]+)(\([\w\-]+\))?!?: [\w\s:\-]+` | Valid pull request title regex pattern in Perl syntax. Defaults to the [conventional commit style](https://www.conventionalcommits.org/en/v1.0.0/) commit messages. Fill with an empty string to disabled pull request title validation. | +| `commit_pattern` | `false` | `''` | Valid pull request commit messages regex pattern in Perl syntax. Fill with an empty string to disabled commit message validation. | +| `branch_pattern` | `false` | `''` | Valid pull request branch name regex pattern in Perl syntax. Fill with an empty string to disabled branch name validation. | +| `body` | `false` | `true` | Require all pull request to have a non-empty body. | +| `issue` | `false` | `true` | Require all pull request to reference an existing issue. | +| `maximum_changes` | `false` | `0` | Limits file changes per one pull request. Fill with zero to disable this feature. | +| `ignored_users` | `false` | `''` | GitHub usernames to be whitelisted from pull request validation. Must be a comma-separated string. Example: `Namchee, foo, bar` will bypass pull request validation for users `Namchee`, `foo`, `bar`. Case-sensitive. | +| `verbose` | `false` | `false` | Post validation report on every pull request validation flow. | +| `edit` | `false` | `false` | Edit existing validation report instead of submitting a new comment. | ## Supported Events @@ -292,7 +292,7 @@ jobs: - name: Validates the pull request uses: Namchee/conventional-pr@v(version) with: - access_token: YOUR_GITHUB_ACCESS_TOKEN_HERE + access_token: YOUR_GITHUB_ACCESS_TOKEN ``` Do note that `pull_request_target` allows unsafe code to be executed from the head of the pull request that could alter your repository or steal any secrets you use in your repository. Avoid using `pull_request_event` if you need to build or run code from the pull request.