Change default branch.

This commit is contained in:
James Pace 2023-02-14 23:14:35 -05:00
parent 31c761f278
commit fc4c02a019
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ which are checked at start up.
* `J7S_URL` - **Required** the url to post to if a change is seen.
* `J7S_HISTORY_FILE` - Default: '/tmp/branch-history.json' the location
to save the last seen state.
* `J7S_PATTERN` - Default: '(^HEAD$|refs/heads/(master|main)$)' python
flavored regex to find branches of concern
* `J7S_PATTERN` - Default: '^HEAD$' python flavored regex to find
branches of concern, for specific branch use '^refs/heads/branch$'
* `J7S_LOOPTIME` - Default: 1.0 minutes between checks of the state of
of the repo

View File

@ -96,7 +96,7 @@ def get_config():
if not url or not repo:
raise Exception('Missing J7S_REPO OR J7S_URL.')
data_file = os.environ.get('J7S_HISTORY_FILE', '/tmp/branch-history.json')
pattern = os.environ.get('J7S_PATTERN', '(^HEAD$|refs/heads/(master|main)$)')
pattern = os.environ.get('J7S_PATTERN', '^HEAD$')
loop_time = float(os.environ.get('J7S_LOOPTIME', 1.0))
return (repo, url, data_file, pattern, loop_time)