Change default branch.
This commit is contained in:
parent
31c761f278
commit
fc4c02a019
|
|
@ -17,7 +17,7 @@ which are checked at start up.
|
||||||
* `J7S_URL` - **Required** the url to post to if a change is seen.
|
* `J7S_URL` - **Required** the url to post to if a change is seen.
|
||||||
* `J7S_HISTORY_FILE` - Default: '/tmp/branch-history.json' the location
|
* `J7S_HISTORY_FILE` - Default: '/tmp/branch-history.json' the location
|
||||||
to save the last seen state.
|
to save the last seen state.
|
||||||
* `J7S_PATTERN` - Default: '(^HEAD$|refs/heads/(master|main)$)' python
|
* `J7S_PATTERN` - Default: '^HEAD$' python flavored regex to find
|
||||||
flavored regex to find branches of concern
|
branches of concern, for specific branch use '^refs/heads/branch$'
|
||||||
* `J7S_LOOPTIME` - Default: 1.0 minutes between checks of the state of
|
* `J7S_LOOPTIME` - Default: 1.0 minutes between checks of the state of
|
||||||
of the repo
|
of the repo
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ def get_config():
|
||||||
if not url or not repo:
|
if not url or not repo:
|
||||||
raise Exception('Missing J7S_REPO OR J7S_URL.')
|
raise Exception('Missing J7S_REPO OR J7S_URL.')
|
||||||
data_file = os.environ.get('J7S_HISTORY_FILE', '/tmp/branch-history.json')
|
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))
|
loop_time = float(os.environ.get('J7S_LOOPTIME', 1.0))
|
||||||
|
|
||||||
return (repo, url, data_file, pattern, loop_time)
|
return (repo, url, data_file, pattern, loop_time)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue