avoid unnecessary checkout, more docs content

This commit is contained in:
AlanCoding
2019-08-12 22:16:03 -04:00
parent 139e8cde70
commit dc5d696238
3 changed files with 58 additions and 18 deletions
+2 -1
View File
@@ -2058,7 +2058,8 @@ class RunProjectUpdate(BaseTask):
os.mkdir(settings.PROJECTS_ROOT)
self.acquire_lock(instance)
self.original_branch = None
if instance.scm_type == 'git' and instance.job_type == 'run' and instance.project:
if (instance.scm_type == 'git' and instance.job_type == 'run' and instance.project and
instance.scm_branch != instance.project.scm_branch):
project_path = instance.project.get_project_path(check_if_exists=False)
if os.path.exists(project_path):
git_repo = git.Repo(project_path)
+1 -1
View File
@@ -139,7 +139,7 @@ export default ['i18n', 'NotificationsList', 'TemplateList',
'<p>' + i18n._('Examples include:') + '</p>' +
'</p><ul class=\"no-bullets\"><li>refs/*:refs/remotes/origin/*</li>' +
'<li>refs/pull/62/head:refs/remotes/origin/pull/62/head</li></ul>' +
'<p>' + i18n._('The first fetches all references. The second fetches only the Github pull request number 62, in this example the branch needs to be `refs/pull/62/head`.') +
'<p>' + i18n._('The first fetches all references. The second fetches the Github pull request number 62, in this example the branch needs to be `pull/62/head`.') +
'</p>' +
'<p>' + i18n._('For more information, refer to the') + '<a target="_blank" href="https://docs.ansible.com/ansible-tower/latest/html/userguide/projects.html#manage-playbooks-using-source-control"> ' + i18n._('Ansible Tower Documentation') + '</a>.</p>',
dataTitle: i18n._('SCM Refspec'),