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 typos #277

Merged
merged 1 commit into from
Feb 6, 2020
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ are in-flight (dependency on Jenkins Core v2.167)
## Version 2.5.3
Release date: 2019-05-23

- [JENKINS-57583](https://issues.jenkins-ci.org/browse/JENKINS-57583): Fixed compatibility with the "Ignore target brach" setting
- [JENKINS-57583](https://issues.jenkins-ci.org/browse/JENKINS-57583): Fixed compatibility with the "Ignore target branch" setting

- [JENKINS-57371](https://issues.jenkins-ci.org/browse/JENKINS-57371): Added graceful fallback to cloning for PRs when needed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ public int hashCode() {
}

@Extension
public static class DesciptorImpl extends Descriptor<Endpoint> {
public static class DescriptorImpl extends Descriptor<Endpoint> {
darxriggs marked this conversation as resolved.
Show resolved Hide resolved

private static final Logger LOGGER = Logger.getLogger(DesciptorImpl.class.getName());
private static final Logger LOGGER = Logger.getLogger(DescriptorImpl.class.getName());

@Override
public String getDisplayName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ public SCMSourceCriteria.Probe create(@NonNull BranchSCMHead head,
// Branches and tags are contained only the current repo, PRs go across forks
// FileNotFoundException can occur in a number of situations
// When this happens, it is not ideal behavior but it is better to let the PR be orphaned
// and the the orphan stratgy control the result than for this error to stop scanning
// and the orphan strategy control the result than for this error to stop scanning
// (For Org scanning this is particularly important.)
// If some more general IO exception is thrown, we will still fail.

Expand Down Expand Up @@ -2343,7 +2343,7 @@ protected Iterable<GHPullRequest> create() {
if (pullRequest.getState() != GHIssueState.OPEN) {
return Collections.emptyList();
}
return new CacheUdatingIterable(Collections.singletonList(pullRequest));
return new CacheUpdatingIterable(Collections.singletonList(pullRequest));
}
Set<String> branchNames = request.getRequestedOriginBranchNames();
if (branchNames != null && branchNames.size() == 1) { // TODO flag to check PRs are all origin PRs
Expand All @@ -2354,14 +2354,14 @@ protected Iterable<GHPullRequest> create() {
request.listener().getLogger().format(
"%n Getting remote pull requests from branch %s...%n", branchName
);
return new CacheUdatingIterable(repo.queryPullRequests()
return new CacheUpdatingIterable(repo.queryPullRequests()
.state(GHIssueState.OPEN)
.head(repo.getOwnerName() + ":" + branchName)
.list());
}
request.listener().getLogger().format("%n Getting remote pull requests...%n");
fullScanRequested = true;
return new CacheUdatingIterable(LazyPullRequests.this.repo.queryPullRequests()
return new CacheUpdatingIterable(LazyPullRequests.this.repo.queryPullRequests()
.state(GHIssueState.OPEN)
.list());
} catch (IOException | InterruptedException e) {
Expand All @@ -2385,12 +2385,12 @@ public void close() throws IOException {
}
}

private class CacheUdatingIterable extends SinglePassIterable<GHPullRequest> {
private class CacheUpdatingIterable extends SinglePassIterable<GHPullRequest> {
darxriggs marked this conversation as resolved.
Show resolved Hide resolved
/**
* A map of all fully populated {@link GHUser} entries we have fetched, keyed by {@link GHUser#getLogin()}.
*/
private Map<String, GHUser> users = new HashMap<>();
CacheUdatingIterable(Iterable<GHPullRequest> delegate) {
CacheUpdatingIterable(Iterable<GHPullRequest> delegate) {
super(delegate);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public boolean equivalent(ChangeRequestSCMRevision<?> o) {
}
PullRequestSCMRevision other = (PullRequestSCMRevision) o;

// JENKINS-57583 - Equivalent is used to make decisiions about when to build.
// JENKINS-57583 - Equivalent is used to make decisions about when to build.
// mergeHash is an implementation detail of github, generated from base and target
// If only mergeHash changes we do not consider it a different revision
return getHead().equals(other.getHead()) && pullHash.equals(other.pullHash);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ && isApiMatch(((GitHubSCMSource) source).getApiUri())
//
// Event consumers are supposed to *not* trust the details reported by an event, it's just a hint.
// All we really want is that we report enough of a head to provide the head.getName()
// then the event consumer is supposed to turn arround and do a fetch(..., event, ...)
// then the event consumer is supposed to turn around and do a fetch(..., event, ...)
// and as GitHubSCMSourceRequest strips out the timestamp in calculating the requested
// tag names, we have a winner.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import java.net.URL;

/**
* Resolves the URI of a GitHub repositort from the API URI, owner and repository name.
* Resolves the URI of a GitHub repository from the API URI, owner and repository name.
*/
public abstract class RepositoryUriResolver {

Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/github-scm-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Behaviour.specify("input[name$=_configuredByUrlRadio]", 'GitHubSCMSourceRadioCon
if (document.createEvent) {
var oEvent = document.createEvent("HTMLEvents");
oEvent.initEvent("change");
// Gets the first Jelly entry afte the hidden value
// Gets the first Jelly entry after the hidden value
var repoOwner = getNthParent(e, 3).nextElementSibling.nextElementSibling.childNodes[2].firstElementChild;
// if the first entry is a select for API URI, gets the following one (each Jelly entry has 3 elements)
if (repoOwner == null || repoOwner.tagName == "SELECT") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ public void OnOverThrottleTimingRateLimitCheck() throws Exception {
ApiRateLimitChecker.ThrottleOnOver.checkApiRateLimit(listener, github);
}

//should be no ouput
//should be no output
assertEquals(0, countOfOutputLinesContaining("Sleeping"));

// check rate limit to hit the next 5 scenarios
Expand Down Expand Up @@ -525,9 +525,9 @@ public void NormalizeExpectedIdealOverTime() throws Exception {

// Expect a triggered throttle for normalize
assertEquals(12, countOfOutputLinesContaining("Current quota"));
//Making sure the budgets are correct
// Making sure the budgets are correct
assertEquals(12, countOfOutputLinesContaining("0 under budget"));
// no occurences of sleeping
// no occurrences of sleeping
assertEquals(0, countOfOutputLines(m -> m.matches("[sS]leeping")));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class BranchDiscoveryTraitTest {
public static JenkinsRule j = new JenkinsRule();

@Test
public void given__disoverAll__when__appliedToContext__then__noFilter() throws Exception {
public void given__discoverAll__when__appliedToContext__then__noFilter() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void xstream() throws Exception {
}

@Test
public void given__disoverHeadMerge__when__appliedToContext__then__strategiesCorrect() throws Exception {
public void given__discoverHeadMerge__when__appliedToContext__then__strategiesCorrect() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand All @@ -51,7 +51,7 @@ public void given__disoverHeadMerge__when__appliedToContext__then__strategiesCor
}

@Test
public void given__disoverHeadOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
public void given__discoverHeadOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand All @@ -76,7 +76,7 @@ public void given__disoverHeadOnly__when__appliedToContext__then__strategiesCorr
}

@Test
public void given__disoverMergeOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
public void given__discoverMergeOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public void readFileFromDir() throws Exception {
// the checkout may have "fixed" line endings that we needed to handle.
// The problem with the raw url data is that it can get out of sync when from the actual content.
// The GitHub API info stays sync'd and correct, so now GHContent.read() pulls from mime encoded data
// in the GHContent record itself. Keeping this for refence in case it changes again.
// in the GHContent record itself. Keeping this for reference in case it changes again.
// try (InputStream inputStream = getClass().getResourceAsStream("/raw/__files/body-fu-bar.txt-b4k4I.txt")) {
// if (inputStream != null) {
// expected = IOUtils.toString(inputStream, StandardCharsets.US_ASCII);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void testExistingMultipleTags() throws IOException {
}

@Test
public void testExistingMultipleTagsGHFileNotFoundExceptionIteratable() throws IOException {
public void testExistingMultipleTagsGHFileNotFoundExceptionIterable() throws IOException {
// Scenario: Requesting multiple tags but a FileNotFound is thrown
// on the first returning the iterator and then an IO error is thrown on the iterator creation
SCMHeadObserver mockSCMHeadObserver = Mockito.mock(SCMHeadObserver.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

public class OriginPullRequestDiscoveryTraitTest {
@Test
public void given__disoverHeadMerge__when__appliedToContext__then__strategiesCorrect() throws Exception {
public void given__discoverHeadMerge__when__appliedToContext__then__strategiesCorrect() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand All @@ -44,7 +44,7 @@ public void given__disoverHeadMerge__when__appliedToContext__then__strategiesCor
}

@Test
public void given__disoverHeadOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
public void given__discoverHeadOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand All @@ -68,7 +68,7 @@ public void given__disoverHeadOnly__when__appliedToContext__then__strategiesCorr
}

@Test
public void given__disoverMergeOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
public void given__discoverMergeOnly__when__appliedToContext__then__strategiesCorrect() throws Exception {
GitHubSCMSourceContext ctx = new GitHubSCMSourceContext(null, SCMHeadObserver.none());
assumeThat(ctx.wantBranches(), is(false));
assumeThat(ctx.wantPRs(), is(false));
Expand Down