Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test/dummy pr #102

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/cpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
edit: true
verbose: true
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
Loading