Merge pull request #10005 from AlanCoding/force_on_override

Update with force option if branch_override

Addresses a reported issue where force-pushing to feature branches did not work.
Connect #9371 (comment)

Reviewed-by: Bill Nottingham <None>
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-05-17 23:58:31 +00:00 committed by GitHub
commit fd60105db3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1767,6 +1767,7 @@ class RunJob(BaseTask):
)
if branch_override:
sync_metafields['scm_branch'] = job.scm_branch
sync_metafields['scm_clean'] = True # to accomidate force pushes
if 'update_' not in sync_metafields['job_tags']:
sync_metafields['scm_revision'] = job_revision
local_project_sync = job.project.create_project_update(_eager_fields=sync_metafields)