Commit Graph

622 Commits

Author SHA1 Message Date
Kohsuke Kawaguchi
c40100b6da [maven-release-plugin] prepare release github-api-1.61 github-api-1.61 2015-02-14 10:28:51 -08:00
Kohsuke Kawaguchi
6396818740 MRELEASE-812 botched 1.60 2015-02-14 10:27:13 -08:00
Kohsuke Kawaguchi
6df5a0d47b Added a test github-api-1.60 2015-02-14 10:13:25 -08:00
Kohsuke Kawaguchi
15c18c5547 Improved the search API 2015-02-14 10:08:46 -08:00
Kohsuke Kawaguchi
4b6981c2e7 Added issue-search capability 2015-02-14 09:53:29 -08:00
Kohsuke Kawaguchi
1b4025300c Merge remote-tracking branch 'origin/master' 2015-02-14 09:32:53 -08:00
Kohsuke Kawaguchi
983c871bff More compilation error fix 2015-02-14 09:30:50 -08:00
Kohsuke Kawaguchi
609f532f8c Merge pull request #143 2015-02-14 08:29:09 -08:00
Kohsuke Kawaguchi
c6fc03c73a In this library domain objects should be immutable. 2015-02-14 08:28:55 -08:00
Kohsuke Kawaguchi
b6e48cc4f9 Use GHObject as much as we can 2015-02-14 08:27:20 -08:00
Kohsuke Kawaguchi
50f43cc178 Inserted backward compatibility methods 2015-02-14 08:26:49 -08:00
Kohsuke Kawaguchi
f421067a0d Looks like Windows line ends have crept in. 2015-02-14 07:01:32 -08:00
Kohsuke Kawaguchi
edd9a2d5b6 Using newly added GHObject in more places. 2015-02-14 06:59:46 -08:00
Kohsuke Kawaguchi
41e0329f55 doc improvement 2015-02-14 06:52:48 -08:00
Kohsuke Kawaguchi
21ea916e0d Pull request #143 introduced wrong file permissions 2015-02-14 06:48:56 -08:00
Kohsuke Kawaguchi
3b6ca3020e Pull request #143 introduced wrong file permissions 2015-02-14 06:47:52 -08:00
Kohsuke Kawaguchi
3737845b78 Merge pull request #143 2015-02-14 06:47:26 -08:00
Kohsuke Kawaguchi
a30c78cd12 restored backward compatibility in the public API 2015-02-14 06:46:27 -08:00
Kohsuke Kawaguchi
f8fba41a30 Merge pull request #141 from alvaro1728/master
Trivial change to enable creating/updating binary content (files).
2015-02-14 09:42:55 -05:00
Kohsuke Kawaguchi
052902fb49 Merge pull request #146 2015-02-14 06:41:06 -08:00
Surya Gaddipati
58143c26bc Use GHCommitState for deployment status state 2015-01-12 10:04:01 -06:00
Surya Gaddipati
5d83894056 Add method for listing deployments 2015-01-02 16:46:56 -06:00
Rob Schoening
e35667525f fix #145 GHTeam.getMembers() does not page properly 2014-12-28 15:47:57 -08:00
Surya Gaddipati
2f318152d8 Complete api implementation for setting/retriving deployment status on a deployment 2014-12-20 17:09:59 -06:00
Surya Gaddipati
bc518a9ae8 Complete implementation of create deployment api 2014-12-20 11:52:49 -06:00
Kohsuke Kawaguchi
425ae2d536 Merge pull request #142 from suryagaddipati/master
Add code for creating deployments for a repo
2014-12-19 11:45:15 -08:00
Kohsuke Kawaguchi
a6cacd4aba Merge pull request #137 from simonecarriero/master
added 'diverged' constant to GHCompare.Status enum
2014-12-19 11:44:10 -08:00
Kohsuke Kawaguchi
5a7083537c Merge pull request #136 from rtyley/page-team-repositories
Add paging support for Team's Repositories
2014-12-19 11:43:56 -08:00
Surya Gaddipati
e15f7a59fd Merge pull request #139 from farmdawgnation/mocking-scope
Put mockito in the test scope.
2014-12-19 12:53:15 -06:00
Surya Gaddipati
a2fa526aa0 Add code for creating deployments for a repo 2014-12-19 12:47:00 -06:00
mendeza
7e959d6a87 Added binary content support - without tabs. 2014-12-18 21:15:29 -08:00
mendeza
5121fe1cbf Added binary content support. 2014-12-18 21:03:28 -08:00
Matt Farmer
3c3d4fc151 Put mockito in the test scope. 2014-11-16 15:31:04 -05:00
Simone Carriero
a7f75c9a6c added 'diverged' constant to GHCompare.Status enum 2014-11-06 12:18:16 +01:00
Roberto Tyley
e7262b8fbe Add paging support for Team's Repositories
The team repositories endpoint does do paging, so gotta support that.
2014-11-06 09:40:37 +00:00
Kohsuke Kawaguchi
af3099c526 [maven-release-plugin] prepare for next development iteration 2014-10-08 12:17:53 -07:00
Kohsuke Kawaguchi
2b9d47cea8 [maven-release-plugin] prepare release github-api-1.59 github-api-1.59 2014-10-08 12:17:49 -07:00
Kohsuke Kawaguchi
5db90d3fc4 This test is invalid if ~/.github file exists, which is quite common 2014-10-08 12:15:32 -07:00
Kohsuke Kawaguchi
372d5ff758 Fixed a test regression
Presumably due to the behaviour change on GitHub API?
2014-10-08 12:07:09 -07:00
Kohsuke Kawaguchi
ebf39eaea1 [INFRA-142]
Reworked version of https://github.com/kohsuke/github-api/pull/133/files
2014-10-08 11:29:17 -07:00
Michael O'Cleirigh
556786f2e1 Merge pull request #131 from mocleiri/resolve-credentials-from-environment
Modify GitHubBuilder to resolve user credentials from the system environ...
2014-09-30 14:07:35 -04:00
Michael O'Cleirigh
0f64994537 Make Github.connect() fail if no credentials are setup
With the previous change if no credentials were defined Github.connect() would
fall back on an anonymous connection.

This commit changes the behaviour back to what it was before so that if there
are no credentials defined in the ~/.github file and no credentials defined
in the environment an IOException is thrown to alert the method caller.

The caller can call Github.connectAnonymously() if that scenario is allowed.

This should handle most cases unless callers are depending on the
FileNotFoundException being specifically thrown instead of an IOException.
2014-09-30 13:58:06 -04:00
Michael O'Cleirigh
ac64c2022b Merge pull request #132 from mocleiri/add-getFiles-method-to-GHCompare
Add GHCompare.getFiles() method to be able to see the precise files chan...
2014-09-30 12:03:54 -04:00
Michael O'Cleirigh
9802132b6f Add GHCompare.getFiles() method to be able to see the precise files changed.
There is a file field inside of GHCompare but no getter to extract the values
for analysis.

There are contents in that field so I've added a new get method so that they
can be extracted.
2014-09-30 11:51:57 -04:00
Michael O'Cleirigh
4d6c5c14f1 Modify GitHubBuilder to resolve user credentials from the system environment
Using the Jenkins EnvInject or Credentials Binding Plugins its possible to
pass credentials as Environment Variables.

Its useful for Github.connect() to be able to directly read the values of the
'login', 'password' and 'oauth' properties directly from the environment.

This commit modifies the base Github.connect() method to resolve credentials
in two steps:

1. ~/.github credentials file if it exists.
2. login, password or oauth variables from the environment

A further fromEnvironment() method is provided to support
loading from non-standard variable names.

The old Github.connect() method would throw an IOException if the ~/.github file
did not exist.  Now it will fail silently instead dropping back to the anonymous
users access level.

Added new unit tests into GitHubTest.
2014-09-29 13:42:28 -04:00
Kohsuke Kawaguchi
d228a5fb93 Merge pull request #128 from ndeloof/patch-1
Update github scopes according to https://developer.github.com/v3/oauth/#scopes
2014-09-26 18:10:15 -07:00
Michael O'Cleirigh
7b46ef10c8 Merge pull request #129 from mocleiri/fix-pull-request-remote-repo-get-commit
Allow pullRequest.getHead().getRepository().getCommit(headSha1) to work
2014-09-26 15:14:25 -04:00
Michael O'Cleirigh
8eb9fba051 Allow pullRequest.getHead().getRepository().getCommit(headSha1) to work
The wrong .wrap method was used for pull requests initialized by state
(GHRepository.getPullReqests).

The wrong wrap call was introduced in 9fd34aec7f

This commit sets it back to the .wrapUp method which makes sure the pull request
substructure has the repo object set properly.

Without this change a NullPointerException is thrown on the last line of this
code because the repo object inside of the remoteRepository object is null:

GHRepository repo = github.getRepository(targetRepository);

List<GHPullRequest> openPullRequests = repo.getPullRequests(GHIssueState.OPEN);

for (GHPullRequest pullRequest : openPullRequests) {

    GHCommitPointer head = pullRequest.getHead();

	GHRepository remoteRepository = head.getRepository();

	String commitId = head.getSha();

	GHCommit headCommit = remoteRepository.getCommit(commitId);
2014-09-22 10:53:13 -04:00
Nicolas De loof
7b58182683 Update github scopes according to https://developer.github.com/v3/oauth/#scopes 2014-09-12 23:16:43 +02:00
Kohsuke Kawaguchi
95fbf9274b Merge pull request #124 from ohtake/connector
Allow to use custom HttpConnector when only OAuth token is given
2014-09-04 10:32:11 -07:00