Bug 1508881

Summary: Automate code from git does not work for repositories without master
Product: Red Hat CloudForms Management Engine Reporter: Pavel Slabý <pavel.slaby>
Component: AutomateAssignee: mkanoor
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8.0CC: jhardy, jocarter, mkanoor, obarenbo, simaishi, smallamp, tfitzger
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1551626 1551627 (view as bug list) Environment:
Last Closed: 2019-02-11 13:54:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1551626, 1551627    

Description Pavel Slabý 2017-11-02 12:38:16 UTC
Description of problem:
I cannot import automate code from git, if the repository does not have master branch.

Steps to Reproduce:
1. Create git repository with different default branch than master. 
   Add some valid code, for example exported one.
2. Navigate to Automation -> Automate -> Import/Export
3. Enter credentials and hit the submit button.

Actual results:
Import failed


Expected results:
Domain was imported from git.


Additional info:
The problem is in GitWorktree file, where master is hard-coded.

Comment 2 Pavel Slabý 2017-11-03 12:18:49 UTC
I have prepared my own patch to get it working in my case. I will prepare PullRequest in GitHub.

Comment 3 Pavel Slabý 2017-11-09 10:19:37 UTC
Pull Requqest attached: https://github.com/ManageIQ/manageiq/pull/16430

Comment 4 mkanoor 2018-02-27 19:57:29 UTC
https://github.com/ManageIQ/manageiq/pull/16690
Merged

Comment 7 Dmitry Misharov 2018-06-26 07:35:45 UTC
Fixed and verified in 5.10.0.1.20180619163011_900fdc4. Git repository without master branch successfully imported.