Skip to content

Commit 5320c2e

Browse files
committed
feat(formulas): allow formula-level upstream branch via. pillar/config
1 parent f9b74e3 commit 5320c2e

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pillar.example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ ssf:
4343
### and simply add your personal token at the top of the script
4444
source: salt://ssf/files/your_directory/git/git_30_create_PR.sh
4545

46+
### Any customisations to the formulas can be made here, e.g. for testing purposes
47+
### Usually, this is unnecessary but a likely override could be an upstream tracking
48+
### branch that doesn't match the value set above, i.e. `ssf:git:branch:upstream`.
49+
semrel_formulas:
50+
ssf:
51+
context:
52+
git:
53+
branch:
54+
upstream: master
55+
4656
### No formulas or files are active by default
4757
### State the formulas and files to work through when running the formula
4858
active:

ssf/config/formulas.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ prepare-git-branch-for-{{ formula }}:
2727
- cwd: {{ ssf.formulas_path }}/{{ formula }}/
2828
- args: >-
2929
prepare-git-branch-for-{{ formula }}
30-
{{ ssf.git.branch.upstream }}
30+
{{ context.git.branch.upstream | d(ssf.git.branch.upstream) }}
3131
{{ context.git.branch.pr }}
3232
{{ context.git.commit.body | regex_escape }}
3333
- runas: {{ ssf.user }}

0 commit comments

Comments
 (0)