8000 fix: always show the GitHub endpoint selection by carlossg · Pull Request #401 · jenkinsci/github-branch-source-plugin · GitHub
[go: up one dir, main page]

Skip to content

fix: always show the GitHub endpoint selection #401

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ public String getIconClassName() {
}

@SuppressWarnings("unused") // jelly
@Deprecated
public boolean isApiUriSelectable() {
return !GitHubConfiguration.get().getEndpoints().isEmpty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,7 @@ static ListBoxModel getPossibleApiUriItems() {
* @return {@code true} if there is more than one GitHub endpoint configured.
*/
@SuppressWarnings("unused") // jelly
@Deprecated
public boolean isApiUriSelectable() {
return !GitHubConfiguration.get().getEndpoints().isEmpty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2235,6 +2235,7 @@ public ListBoxModel doFillApiUriItems() {
return result;
}

@Deprecated 10000
public boolean isApiUriSelectable() {
return !GitHubConfiguration.get().getEndpoints().isEmpty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@
<f:textbox/>
</f:entry>
<j:choose>
<j:when test="${descriptor.apiUriSelectable}">
<f:entry title="${%API endpoint}" field="apiUri">
<f:select/>
</f:entry>
</j:when>
<j:otherwise>
<f:invisibleEntry>
<f:select field="apiUri"/>
</f:invisibleEntry>
</j:otherwise>
<f:entry title="${%API endpoint}" field="apiUri">
<f:select/>
</f:entry>
</j:choose>

<f:entry title="${%Key}" field="privateKey">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<p>
<a href="https://developer.github.com/v3/">GitHub API</a> endpoint such as <code>https://github.example.com/api/v3/</code>.
The list of servers is configured in the <strong>Manage Jenkins » Configure System » GitHub Enterprise Servers</strong> screen.
</p>
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:c="/lib/credentials" xmlns:scm="/jenkins/scm/api/form">
<j:choose>
<j:when test="${descriptor.apiUriSelectable}">
<f:entry title="${%API endpoint}" field="apiUri">
<f:select/>
</f:entry>
</j:when>
<j:otherwise>
<f:entry title="${%API endpoint}" field="apiUri">
<f:textbox readonly="readonly"/>
</f:entry>
</j:otherwise>
</j:choose>
<f:entry title="${%API endpoint}" field="apiUri">
<f:select/>
</f:entry>
Comment on lines +4 to +6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this drop down will also include github.com if the endpoint list is empty. Or did that change at some point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does not include github.com

<f:entry title="${%Credentials}" field="credentialsId">
<c:select checkMethod="post"/>
</f:entry>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div>
The server to connect to. The list of servers is configured in the <strong>Manage Jenkins » Configure
System » GitHub Enterprise Servers</strong> screen.
<a href="https://developer.github.com/v3/">GitHub API</a> endpoint such as <code>https://github.example.com/api/v3/</code>.
The list of servers is configured in the <strong>Manage Jenkins » Configure System » GitHub Enterprise Servers</strong> screen.
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
</f:radioBlock>
<f:radioBlock name="configuredByUrlRadio" value="false" checked="false" title="${%Repository Scan - Deprecated Visualization}" inline="true">
<f:nested>
<j:choose>
<j:when test="${descriptor.apiUriSelectable}">
<f:entry title="${%API endpoint}" field="apiUri">
<f:select/>
</f:entry>
</j:when>
</j:choose>
<f:entry title="${%API endpoint}" field="apiUri">
<f:select/>
</f:entry>
<f:entry title ="${%Owner}" field="repoOwner">
<f:textbox/>
</f:entry>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div>
The server to connect to. The list of servers is configured in the <strong>Manage Jenkins » Configure
System » GitHub Enterprise Servers</strong> screen.
<a href="https://developer.github.com/v3/">GitHub API</a> endpoint such as <code>https://github.example.com/api/v3/</code>.
The list of servers is configured in the <strong>Manage Jenkins » Configure System » GitHub Enterprise Servers</strong> screen.
</div>
0