Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix branches missing in list when using git token in General Configuration #3775

Merged
merged 1 commit into from
Feb 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions themes-default/legacy/views/config_general.mako
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
% if gh_branch:
% for cur_branch in gh_branch:
% if app.GIT_USERNAME and app.GIT_PASSWORD and app.DEVELOPER == 1:
% if ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and app.DEVELOPER == 1:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif app.GIT_USERNAME and app.GIT_PASSWORD and cur_branch in ['master', 'develop']:
% elif ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and cur_branch in ['master', 'develop']:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif cur_branch == 'master':
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
Expand Down
4 changes: 2 additions & 2 deletions themes-default/slim/views/config_general.mako
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
% if gh_branch:
% for cur_branch in gh_branch:
% if app.GIT_USERNAME and app.GIT_PASSWORD and app.DEVELOPER == 1:
% if ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and app.DEVELOPER == 1:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif app.GIT_USERNAME and app.GIT_PASSWORD and cur_branch in ['master', 'develop']:
% elif ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and cur_branch in ['master', 'develop']:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif cur_branch == 'master':
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
Expand Down
4 changes: 2 additions & 2 deletions themes/dark/templates/config_general.mako
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
% if gh_branch:
% for cur_branch in gh_branch:
% if app.GIT_USERNAME and app.GIT_PASSWORD and app.DEVELOPER == 1:
% if ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and app.DEVELOPER == 1:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif app.GIT_USERNAME and app.GIT_PASSWORD and cur_branch in ['master', 'develop']:
% elif ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and cur_branch in ['master', 'develop']:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif cur_branch == 'master':
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
Expand Down
4 changes: 2 additions & 2 deletions themes/legacy/templates/config_general.mako
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
% if gh_branch:
% for cur_branch in gh_branch:
% if app.GIT_USERNAME and app.GIT_PASSWORD and app.DEVELOPER == 1:
% if ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and app.DEVELOPER == 1:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif app.GIT_USERNAME and app.GIT_PASSWORD and cur_branch in ['master', 'develop']:
% elif ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and cur_branch in ['master', 'develop']:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif cur_branch == 'master':
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
Expand Down
4 changes: 2 additions & 2 deletions themes/light/templates/config_general.mako
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@
<select id="branchVersion" class="form-control form-control-inline input-sm pull-left">
% if gh_branch:
% for cur_branch in gh_branch:
% if app.GIT_USERNAME and app.GIT_PASSWORD and app.DEVELOPER == 1:
% if ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and app.DEVELOPER == 1:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif app.GIT_USERNAME and app.GIT_PASSWORD and cur_branch in ['master', 'develop']:
% elif ((app.GIT_USERNAME and app.GIT_PASSWORD) or app.GIT_TOKEN) and cur_branch in ['master', 'develop']:
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
% elif cur_branch == 'master':
<option value="${cur_branch}" ${'selected="selected"' if app.BRANCH == cur_branch else ''}>${cur_branch}</option>
Expand Down