Skip to content

Automatically closes weekend-submitted pull requests. Enjoy your good weekends!

License

Notifications You must be signed in to change notification settings

Namchee/good-weekend

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Good Weekend

Go Version

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:

on:
  pull_request:

jobs:
  pr-check:
    runs-on: ubuntu-latest
    steps:
      - name: good-weekend
        uses: Namchee/good-weekend@v{version}
        with:
          access_token: <YOUR_GITHUB_ACCESS_TOKEN_HERE>

Please refer to GitHub Workflows Syntax 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 which is used to interact with GitHub's API. It is recommended to store this with GitHub secrets
timezone false UTC Timezone location on tz database. Cheatsheet
message false See here 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

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. However, this can be circumenvented changing the event target 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.

on:
  pull_request_target:

jobs:
  pr-check:
    runs-on: ubuntu-latest
    steps:
      - name: good-weekend
        uses: Namchee/good-weekend@v{version}
        with:
          access_token: <YOUR_GITHUB_ACCESS_TOKEN_HERE>

License

This project is licensed under the MIT license

About

Automatically closes weekend-submitted pull requests. Enjoy your good weekends!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published