Skip to content

Commit d5a5759

Browse files
committed
fix(playbook): git config for dry-run
Instead of using git config --global, make the git config commands local to each operator repository. This is then safe to run via test.sh (dry-run).
1 parent 325b7af commit d5a5759

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

playbook/playbook.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
path: "{{ work_dir }}"
1616
state: directory
1717

18-
- name: Configure git author mail
19-
command:
20-
argv: [git, config, --global, user.email, "{{ author_mail }}"]
21-
22-
- name: Configure git author name
23-
command:
24-
argv: [git, config, --global, user.name, "{{ author_name }}"]
25-
2618
- name: Login to github
2719
command:
2820
argv: [gh, auth, login, --with-token]

playbook/update_repo.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@
111111
register: git_change
112112
failed_when: git_change.rc == 0 # fail when there are no changes
113113

114+
- name: Configure git author mail
115+
command:
116+
argv: [git, config, user.email, "{{ author_mail }}"]
117+
chdir: "{{ work_dir }}/{{ operator.name }}"
118+
119+
- name: Configure git author name
120+
command:
121+
argv: [git, config, user.name, "{{ author_name }}"]
122+
chdir: "{{ work_dir }}/{{ operator.name }}"
123+
114124
- name: "Operator [{{ operator.name }}] stage all changes"
115125
command:
116126
argv: [git, add, .]

0 commit comments

Comments
 (0)