https://github.com/namchee/good-weekend
Automatically closes weekend-submitted pull requests. Enjoy your good weekends!
https://github.com/namchee/good-weekend
github-actions weekend
Last synced: 9 months ago
JSON representation
Automatically closes weekend-submitted pull requests. Enjoy your good weekends!
- Host: GitHub
- URL: https://github.com/namchee/good-weekend
- Owner: Namchee
- License: mit
- Created: 2021-01-23T11:19:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-04T14:32:42.000Z (about 4 years ago)
- Last Synced: 2024-12-01T13:21:16.452Z (over 1 year ago)
- Topics: github-actions, weekend
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Good Weekend
[](https://github.com/Namchee/good-weekend)
Good Weekend is a simple GitHub Action that automatically rejects any pull requests submitted on weekends. Enjoy your hassle-free weekends!
## Usage
Simply add this actions to your GitHub Workflows job, for example:
```yaml
on:
pull_request:
jobs:
pr-check:
runs-on: ubuntu-latest
steps:
- name: good-weekend
uses: Namchee/good-weekend@v{version}
with:
access_token:
```
Please refer to [GitHub Workflows Syntax](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions) for more advanced usage.
## Inputs
This action is customizable with these following inputs (fill it in `with` section in the job steps)
Name | Required? | Default | Description
---- | --------- | ------- | -----------
`access_token` | `true` | | [GitHub's access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) which is used to interact with GitHub's API. It is recommended to store this with [GitHub secrets](https://docs.github.com/en/actions/reference/encrypted-secrets)
`timezone` | `false` | `UTC` | Timezone location on [tz database](https://www.iana.org/time-zones). [Cheatsheet](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
`message` | `false` | [See here](./action.yml) | Message to be shown on weekend-submitted pull requests
`label` | `false` | `good-weekend` | Label to be added on weekend-submitted pull requests
For more information, please refer to the [action metadata](./action.yml)
## Forked Repository
By default, the `pull_request` event does not allow GitHub actions to be executed from a forked repository due to [GitHub repository access exploit via GitHub Action](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/). However, this can be circumenvented changing the [event target](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows) from `pull_request` to `pull_request_target` which changes the execution context from the fork to the base repository. Below is the example of action configuration using `pull_request_target`.
```yaml
on:
pull_request_target:
jobs:
pr-check:
runs-on: ubuntu-latest
steps:
- name: good-weekend
uses: Namchee/good-weekend@v{version}
with:
access_token:
```
## License
This project is licensed under the [MIT license](./LICENSE)