Skip to content

๐Ÿ“† Schedule your commit based on allowed dates!

License

Notifications You must be signed in to change notification settings

oxwazz/schedule_pre_commit_hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Schedule - pre-commit hooks

badge-workflow badge-twitter

๐Ÿ“† This is custom pre-commit hooks for scheduling your commit!

Contents

Usage

๐ŸŽฉ Easily schedule your commit based on allowed dates! Follow the steps below:

Copy the code snippet below and paste it into your .pre-commit-config.yaml file.

default_install_hook_types: [ pre-commit, post-commit ]
repos:
  - repo: https://github.com/oxwazz/schedule_pre_commit_hooks
    rev: v0.1.1
    hooks:
      - id: schedule
        stages:
          - post-commit
        always_run: true
        args:
          # my timezone
          - --timezone=+0700
          # on sunday your commit date always between 05:00-10:00
          - --schedule=sunday|05:00-10:00
          # on monday your commit date always between 05:00-07:00 or 20:00-23:00
          - --schedule=monday|05:00-07:00,20:00-23:00

Tip

You can adjust the --timezone and --schedule with your needs.

Congratulation! ๐ŸŽ‰ You are now schedule your commit based on allowed dates!

Why

ยฏ\_(ใƒ„)_/ยฏ

or you can have...

1. ...a 'work-life balance' commit
default_install_hook_types: [ pre-commit, post-commit ]
repos:
  - repo: https://github.com/oxwazz/schedule_pre_commit_hooks
    rev: v0.1.1
    hooks:
      - id: schedule
        stages:
          - post-commit
        always_run: true
        args:
          - --timezone=+0700
          - --schedule=monday|08:00-17:00
          - --schedule=tuesday|08:00-17:00
          - --schedule=wednesday|08:00-17:00
          - --schedule=thursday|08:00-17:00
          - --schedule=friday|08:00-17:00
          - --schedule=saturday|08:00-17:00
          - --schedule=sunday|08:00-17:00
2. ...a 'stay up late' commit
default_install_hook_types: [ pre-commit, post-commit ]
repos:
  - repo: https://github.com/oxwazz/schedule_pre_commit_hooks
    rev: v0.1.1
    hooks:
      - id: schedule
        stages:
          - post-commit
        always_run: true
        args:
          - --timezone=+0700
          - --schedule=monday|20:00-23:59,00:00-02:00
          - --schedule=tuesday|20:00-23:59,00:00-02:00
          - --schedule=wednesday|20:00-23:59,00:00-02:00
          - --schedule=thursday|20:00-23:59,00:00-02:00
          - --schedule=friday|20:00-23:59,00:00-02:00
          - --schedule=saturday|20:00-23:59,00:00-02:00
          - --schedule=sunday|20:00-23:59,00:00-02:00
3. ...a 'morning guy' commit
default_install_hook_types: [ pre-commit, post-commit ]
repos:
  - repo: https://github.com/oxwazz/schedule_pre_commit_hooks
    rev: v0.1.1
    hooks:
      - id: schedule
        stages:
          - post-commit
        always_run: true
        args:
          - --timezone=+0700
          - --schedule=monday|06:00-08:00
          - --schedule=tuesday|06:00-08:00
          - --schedule=wednesday|06:00-08:00
          - --schedule=thursday|06:00-08:00
          - --schedule=friday|06:00-08:00
          - --schedule=saturday|06:00-08:00
          - --schedule=sunday|06:00-08:00

Contributing

๐ŸŽˆ Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the project.

Credit

๐Ÿ“Œ Schedule - pre-commit hooks is currently being developed and maintained by Muhammad Rahmahalim.
Thank you!

License

MIT License ยฉ 2024 Muhammad Rahmahalim

About

๐Ÿ“† Schedule your commit based on allowed dates!

Topics

Resources

License

Stars

Watchers

Forks

Languages