Closed quetzai closed 6 years ago
Hi and thanks for looking into this. Accepting this PR would break the expectations of everyone who assumes the old behavior (i.e. always update the branchSpec/name
).
I can think of two alternative solutions:
ignore-jobs
config key, which would list job names that jenkins-autojobs should not touch. (jenkins-autojobs-ignore)
in their description.These have the added benefit of working for all SCM plugins.
Hi,
I'm not sure this new commit is what you had in mind. Since I'm far from an expert in svn and mercurial, I didn't touch these (not sure this feature would be usefull for svn).
Regards
During the extraction of a job configuration, the substitution of variables is done before git script starts looking for existing branches in the git repo. If the template has already a branch or a commit specified, it is automatically erased without checking.
This commit checks if such a treeish exists and avoid erasing it.