File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
ansible/roles/source-repo-sync/tasks Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 17
17
cmd : |
18
18
gh api \
19
19
-H "Accept: application/vnd.github.v3+json" \
20
- /repos/{{ owner }}/{{ repository_manifest.name }}/git/ref/heads/{{ community_manifest.branch }}-community-files
20
+ /repos/{{ owner }}/{{ repository_manifest.name }}/git/ref/heads/{{ community_manifest.prefix | default("") }}{{ community_manifest. branch }}-community-files
21
21
changed_when : false
22
22
failed_when : false
23
23
register : branch_exists
28
28
gh api \
29
29
--method DELETE \
30
30
-H "Accept: application/vnd.github.v3+json" \
31
- /repos/{{ owner }}/{{ repository_manifest.name }}/git/refs/heads/{{ community_manifest.branch }}-community-files
31
+ /repos/{{ owner }}/{{ repository_manifest.name }}/git/refs/heads/{{ community_manifest.prefix | default("") }}{{ community_manifest. branch }}-community-files
32
32
when : branch_exists.rc == 0
33
33
34
34
- name : Create working branch # noqa command-instead-of-module
35
35
ansible.builtin.shell :
36
36
cmd : >
37
- git checkout -b {{ community_manifest.branch }}-community-files \
37
+ git checkout -b {{ community_manifest.prefix | default("") }}{{ community_manifest. branch }}-community-files \
38
38
origin/{{ community_manifest.prefix | default("") }}{{ community_manifest.branch }}
39
39
chdir : " {{ staging_path }}/{{ repository_manifest.name }}"
40
40
changed_when : true
65
65
66
66
- name : Push branch to remote # noqa command-instead-of-module command-instead-of-shell no-handler
67
67
ansible.builtin.shell :
68
- cmd : " git push -u origin {{ community_manifest.branch }}-community-files"
68
+ cmd : " git push -u origin {{ community_manifest.prefix | default('') }}{{ community_manifest. branch }}-community-files"
69
69
chdir : " {{ staging_path }}/{{ repository_manifest.name }}"
70
70
when : community_copy.changed | bool
71
71
Original file line number Diff line number Diff line change 17
17
cmd : |
18
18
gh api \
19
19
-H "Accept: application/vnd.github.v3+json" \
20
- /repos/{{ owner }}/{{ repository_manifest.name }}/git/ref/heads/{{ workflow_manifest.branch }}-workflows
20
+ /repos/{{ owner }}/{{ repository_manifest.name }}/git/ref/heads/{{ workflow_manifest.prefix | default("") }}{{ workflow_manifest. branch }}-workflows
21
21
changed_when : false
22
22
failed_when : false
23
23
register : working_branch_exists
28
28
gh api \
29
29
--method DELETE \
30
30
-H "Accept: application/vnd.github.v3+json" \
31
- /repos/{{ owner }}/{{ repository_manifest.name }}/git/refs/heads/{{ workflow_manifest.branch }}-workflows
31
+ /repos/{{ owner }}/{{ repository_manifest.name }}/git/refs/heads/{{ workflow_manifest.prefix | default("") }}{{ workflow_manifest. branch }}-workflows
32
32
when : working_branch_exists.rc == 0
33
33
34
34
- name : Create working branch # noqa command-instead-of-module
35
35
ansible.builtin.shell :
36
36
cmd : >
37
- git checkout -b {{ workflow_manifest.branch }}-workflows \
37
+ git checkout -b {{ workflow_manifest.prefix | default("") }}{{ workflow_manifest. branch }}-workflows \
38
38
origin/{{ workflow_manifest.prefix | default("") }}{{ workflow_manifest.branch }}
39
39
chdir : " {{ staging_path }}/{{ repository_manifest.name }}"
40
40
changed_when : true
84
84
85
85
- name : Push branch to remote # noqa command-instead-of-module command-instead-of-shell no-handler
86
86
ansible.builtin.shell :
87
- cmd : " git push -u origin {{ workflow_manifest.branch }}-workflows"
87
+ cmd : " git push -u origin {{ workflow_manifest.prefix | default('') }}{{ workflow_manifest. branch }}-workflows"
88
88
chdir : " {{ staging_path }}/{{ repository_manifest.name }}"
89
89
changed_when : true
90
90
You can’t perform that action at this time.
0 commit comments