Commit Graph

1994 Commits

Author SHA1 Message Date
Liam Newman
301303bd90 Merge pull request #1139 from akashRindhe/feature/1080
(feat) Add method to check if Organization has projects enabled
2021-05-13 11:26:07 -07:00
Akash Rindhe
4689b8f885 (feat) Add method to set projects enabled flag for Organization
[https://github.com/hub4j/github-api/issues/1080]
2021-05-14 00:36:55 +08:00
Akash Rindhe
c4de682493 (feat) Add method to check if Organization has projects enabled
[https://github.com/hub4j/github-api/issues/1080]
2021-05-14 00:35:22 +08:00
Liam Newman
b23934a5a1 Merge pull request #1134 from bitwiseman/task/atomic
Minimize locking for rate limit
2021-05-11 10:26:00 -07:00
Liam Newman
f2eecc3cc5 Update src/main/java/org/kohsuke/github/GHRateLimit.java 2021-05-06 14:37:11 -07:00
Liam Newman
f2a70a46ad Minimize locking for rate limit
Rather than locking to ensure ordered updates to rate limit, use AtomicReference. This reduces
the need for locking to only when rate limit has expired and we have to call getRateLimit().
2021-05-04 12:29:05 -07:00
Liam Newman
d526b13d7d Apply suggestions from code review
Co-authored-by: Guillaume Smet <guillaume.smet@gmail.com>
2021-04-28 13:33:13 -07:00
Liam Newman
fffe31220e Make apache commons restrictions more accurate and legible 2021-04-27 15:19:46 -07:00
Liam Newman
ce17396ea6 Merge branch 'main' into upgrade-commons-io 2021-04-27 02:33:44 -07:00
Liam Newman
d18e81dc74 More informative message 2021-04-26 21:13:09 -07:00
Liam Newman
6ae5acba5d Fix typo 2021-04-26 21:08:59 -07:00
Liam Newman
0a1c803f69 Test for approved Apache commons methods
This is an inaccurate way of verifying that we are calling only methods that are
compatible with older versions of commons, but it should be sufficient to deter
usage without careful consideration.
2021-04-26 20:39:27 -07:00
Liam Newman
fa0865b208 Fix assertThat arch test 2021-04-26 14:27:28 -07:00
Liam Newman
5c64fec032 Streamline with EnumUtils 2021-04-21 16:57:37 -07:00
Akash Rindhe
72dc5c5d18 (refactor) Replace complex parsing logic from GHEvent.type to GHEvent with static mapping
[https://github.com/hub4j/github-api/issues/1099]
2021-04-21 20:07:10 +08:00
Liam Newman
cd1454ac03 More assertThat matchers 2021-04-20 12:34:01 -07:00
Liam Newman
b550910f4c Streamline assertThat calls using appropriate matchers 2021-04-20 12:16:55 -07:00
Liam Newman
d13e490be2 Enforce use of assertThat
Assert.assert* methods other than assertThat() produce less clear tests.
This change enforces using assertThat() for all verifications.
While more verbose they are generally more consistent and easier to understand.
2021-04-20 00:46:43 -07:00
Liam Newman
3d451526ef Deprecate all asserts other than assertThat 2021-04-19 19:09:47 -07:00
Liam Newman
bd38897d48 Do not inherit from Assert 2021-04-19 15:58:33 -07:00
Liam Newman
8af66133d2 Switch to 'main' as default branch 2021-04-19 13:27:44 -07:00
Akash Rindhe
092815747a (refactor) Rename gitHubBeforeAfter to nonRecordingGitHub #1076
[#1076]
2021-04-18 18:41:10 +08:00
Liam Newman
684560ef67 GHRepository#listLanguages returns correct Map type
This is a less than perfect solution, but it is sufficient to solve the current issue
without risking further side-effects.

Fixes #1103
2021-04-16 14:25:28 -07:00
Liam Newman
dcdfee67cd Cover more code paths using existing test 2021-04-16 13:00:42 -07:00
Akash Rindhe
9d7209ec62 Merge branch 'master' into feature/1050 2021-04-17 00:23:46 +08:00
Akash Rindhe
b97e8a2c38 (feat) Return GHLabel list instead of void on GHIssue#removeLabel(s) #1050
Includes BridgeMethod annotation to keep binary compatibility
(https://github.com/hub4j/github-api/issues/1050)
2021-04-17 00:22:52 +08:00
Akash Rindhe
8bd3f391da (feat) Return GHLabel list instead of void on GHIssue#addLabels #1050
Includes BridgeMethod annotation to keep binary compatibility
(https://github.com/hub4j/github-api/issues/1050)
2021-04-17 00:06:50 +08:00
Liam Newman
38f3595552 Streamline code paths 2021-04-15 15:29:50 -07:00
Liam Newman
b72e7fa2ee Add BEST_MATCH and expand test 2021-04-15 14:49:23 -07:00
breandan
659b32f5ec update test data 2021-04-15 16:49:24 -04:00
breandan
d0c326bbf5 apply spotless formatting 2021-04-15 16:42:15 -04:00
breandan
4a5aceb1f9 add content and order parameters to GHContentSearchBuilder as per #1088 2021-04-15 16:29:23 -04:00
Liam Newman
884248930e Merge pull request #1096 from gsmet/add-event-schedule
Add SCHEDULE to GHEvent and add UNKNOWN handling to GHEvent
2021-04-14 15:58:52 -07:00
Guillaume Smet
5957da3d6d Log 202 message at the FINE level 2021-04-14 18:43:52 +02:00
Guillaume Smet
6efe428f57 Log a warning when we have an unknown enum value
Can be useful to catch values we should add instead of simply ignoring
them.
2021-04-14 18:36:36 +02:00
Guillaume Smet
25b9a2ce33 Return GHEvent.UNKNOWN in GHEventInfo.getType() if unknown 2021-04-14 18:36:13 +02:00
Guillaume Smet
0ce78016cc Be more permissive about GHEvent parsing 2021-04-14 16:31:57 +02:00
Guillaume Smet
696dd90b23 Add SCHEDULE to GHEvent
This is a valid event for scheduled workflow runs.
2021-04-14 16:26:43 +02:00
Liam Newman
874ce23dd7 Improve coverage of GitHubClient 2021-04-12 15:19:48 -07:00
Liam Newman
bd19f23b3f Merge pull request #1087 from gsmet/label-payload
Add label payload
2021-04-12 10:00:18 -07:00
Guillaume Smet
bf082f2a46 Properly wrap the check runs with the repository when listing them 2021-04-12 18:15:23 +02:00
Guillaume Smet
626574ae36 Add missing javadoc for GHEventPayload.WorkflowRun 2021-04-10 12:55:05 +02:00
Guillaume Smet
8c9eb3393b Add label payload 2021-04-10 12:55:05 +02:00
Liam Newman
8e20f4d9f5 Replace reflection with X-HTTP-Method-Override
Fixes #754
2021-04-08 14:36:40 -07:00
Liam Newman
18e7138812 Update src/main/java/org/kohsuke/github/GHWorkflowRun.java 2021-04-05 13:07:40 -07:00
Liam Newman
bfb3b94478 Update src/main/java/org/kohsuke/github/GHWorkflowRun.java 2021-04-05 13:07:32 -07:00
Guillaume Smet
fc98e72569 Rename GHWorkflowRunJob to GHWorkflowJob 2021-04-05 18:26:16 +02:00
Guillaume Smet
258acf79f6 Small adjustments to the API exposed to get jobs 2021-04-05 17:43:55 +02:00
Guillaume Smet
b509076d6f Add ability to get jobs and download logs from jobs 2021-04-05 15:32:46 +02:00
Guillaume Smet
f57ea4c4e9 Fix some infelicities in GHWorkflowRun javadoc 2021-04-05 15:31:30 +02:00