Skip to content

Commit

Permalink
Merge pull request #53622 from sathieu/git_pillar_update_by_name
Browse files Browse the repository at this point in the history
runners.git_pillar: Also match the repo parameter against the repo name
  • Loading branch information
Akm0d authored Jun 28, 2019
2 parents 378e137 + 36e771d commit 55ab4f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion salt/runners/git_pillar.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ def update(branch=None, repo=None):
changes were fetched. ``False`` now is reserved only for instances in
which there were errors.
.. versionchanged:: 2020.2.0
The repo parameter also matches against the repo name.
Fetch one or all configured git_pillar remotes.
.. note::
Expand All @@ -55,6 +58,8 @@ def update(branch=None, repo=None):
# Update specific branch and repo
salt-run git_pillar.update branch='branch' repo='https://foo.com/bar.git'
# Update specific repo, by name
salt-run git_pillar.update repo=myrepo
# Update all repos
salt-run git_pillar.update
# Run with debug logging
Expand All @@ -78,7 +83,7 @@ def update(branch=None, repo=None):
if branch != remote.branch:
continue
if repo is not None:
if repo != remote.url:
if repo != remote.url and repo != remote.name:
continue
try:
result = remote.fetch()
Expand Down

0 comments on commit 55ab4f8

Please sign in to comment.