Bug 1508881 - Automate code from git does not work for repositories without master
Summary: Automate code from git does not work for repositories without master
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: mkanoor
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks: 1551626 1551627
TreeView+ depends on / blocked
 
Reported: 2017-11-02 12:38 UTC by Pavel Slabý
Modified: 2022-03-13 14:31 UTC (History)
7 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1551626 1551627 (view as bug list)
Environment:
Last Closed: 2019-02-11 13:54:57 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.