Skip to content

Commit 8cc873e

Browse files
authored
Merge branch 'main' into feat/graphql-exception-handling
2 parents 343ec1a + 90764c4 commit 8cc873e

8 files changed

Lines changed: 37 additions & 20 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
java-version: 17
4949

5050
- name: Checkout repository
51-
uses: actions/checkout@v6
51+
uses: actions/checkout@v7
5252

5353
# Initializes the CodeQL tools for scanning.
5454
- name: Initialize CodeQL

.github/workflows/create_release_tag_and_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
create_release_tag:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@v7
1414
with:
1515
fetch-depth: 0
1616

.github/workflows/maven-build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- main-2.x
7+
- main-1.x
88
- '!/refs/heads/dependabot/*'
99
pull_request:
1010
branches:
@@ -25,7 +25,7 @@ jobs:
2525
strategy:
2626
fail-fast: true
2727
steps:
28-
- uses: actions/checkout@v6
28+
- uses: actions/checkout@v7
2929
- name: Set up JDK
3030
uses: actions/setup-java@v5
3131
with:
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
steps:
50-
- uses: actions/checkout@v6
50+
- uses: actions/checkout@v7
5151
- name: Set up JDK
5252
uses: actions/setup-java@v5
5353
with:
@@ -68,7 +68,7 @@ jobs:
6868
strategy:
6969
fail-fast: true
7070
steps:
71-
- uses: actions/checkout@v6
71+
- uses: actions/checkout@v7
7272
- name: Set up JDK
7373
uses: actions/setup-java@v5
7474
with:
@@ -90,7 +90,7 @@ jobs:
9090
os: [ ubuntu, windows ]
9191
java: [ 17, 21 ]
9292
steps:
93-
- uses: actions/checkout@v6
93+
- uses: actions/checkout@v7
9494
- name: Set up JDK
9595
uses: actions/setup-java@v5
9696
with:
@@ -120,13 +120,13 @@ jobs:
120120
needs: test
121121
runs-on: ubuntu-latest
122122
steps:
123-
- uses: actions/checkout@v6
123+
- uses: actions/checkout@v7
124124
- uses: actions/download-artifact@v8
125125
with:
126126
name: maven-test-target-directory
127127
path: target
128128
- name: Codecov Report
129-
uses: codecov/codecov-action@v6.0.0
129+
uses: codecov/codecov-action@v7.0.0
130130
with:
131131
# Codecov token from https://app.codecov.io/gh/hub4j/github-api/settings
132132
token: ${{ secrets.CODECOV_TOKEN }}
@@ -138,7 +138,7 @@ jobs:
138138
needs: build
139139
runs-on: ubuntu-latest
140140
steps:
141-
- uses: actions/checkout@v6
141+
- uses: actions/checkout@v7
142142
- uses: actions/download-artifact@v8
143143
with:
144144
name: maven-target-directory

.github/workflows/publish_release_branch.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@v7
1616
- name: Set up Maven Central Repository
1717
uses: actions/setup-java@v5
1818
with:
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
needs: build
3737
steps:
38-
- uses: actions/checkout@v6
38+
- uses: actions/checkout@v7
3939
- name: Set up Maven Central Repository
4040
uses: actions/setup-java@v5
4141
with:
@@ -69,7 +69,7 @@ jobs:
6969
needs: build
7070
if: ${{ github.ref == 'refs/heads/release/v2.x' }}
7171
steps:
72-
- uses: actions/checkout@v6
72+
- uses: actions/checkout@v7
7373
with:
7474
fetch-depth: 0
7575

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
<dependency>
104104
<groupId>org.slf4j</groupId>
105105
<artifactId>slf4j-bom</artifactId>
106-
<version>2.0.17</version>
106+
<version>2.0.18</version>
107107
<type>pom</type>
108108
<scope>import</scope>
109109
</dependency>
@@ -211,7 +211,7 @@
211211
<dependency>
212212
<groupId>com.google.code.gson</groupId>
213213
<artifactId>gson</artifactId>
214-
<version>2.13.2</version>
214+
<version>2.14.0</version>
215215
<scope>test</scope>
216216
</dependency>
217217
<dependency>
@@ -340,7 +340,7 @@
340340
</plugin>
341341
<plugin>
342342
<artifactId>maven-resources-plugin</artifactId>
343-
<version>3.3.1</version>
343+
<version>3.5.0</version>
344344
</plugin>
345345
<plugin>
346346
<artifactId>maven-source-plugin</artifactId>
@@ -535,7 +535,7 @@
535535
<plugin>
536536
<groupId>com.github.siom79.japicmp</groupId>
537537
<artifactId>japicmp-maven-plugin</artifactId>
538-
<version>0.23.1</version>
538+
<version>0.26.1</version>
539539
<configuration>
540540
<parameter>
541541
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
@@ -904,7 +904,7 @@
904904
<plugin>
905905
<groupId>org.apache.maven.plugins</groupId>
906906
<artifactId>maven-enforcer-plugin</artifactId>
907-
<version>3.6.2</version>
907+
<version>3.6.3</version>
908908
<executions>
909909
<execution>
910910
<id>enforce-jacoco-exist</id>

src/main/java/org/kohsuke/github/GHIssue.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ protected static List<String> getLogins(Collection<GHUser> users) {
121121
/** The assignees. */
122122
protected GHUser[] assignees;
123123

124+
/** The author's association with the repository. */
125+
protected String authorAssociation;
126+
124127
/** The body. */
125128
@SkipFromToString
126129
protected String body;
@@ -349,6 +352,17 @@ public List<GHUser> getAssignees() {
349352
return Collections.unmodifiableList(Arrays.asList(assignees));
350353
}
351354

355+
/**
356+
* Gets the author's association with the repository.
357+
*
358+
* @return the author association
359+
*/
360+
public GHCommentAuthorAssociation getAuthorAssociation() {
361+
return EnumUtils.getEnumOrDefault(GHCommentAuthorAssociation.class,
362+
authorAssociation,
363+
GHCommentAuthorAssociation.UNKNOWN);
364+
}
365+
352366
/**
353367
* The description of this pull request.
354368
*

src/site/apt/index.apt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ GitHub github = GitHubBuilder.fromEnvironment().build();
139139
Pluggable HTTP client
140140

141141
This library comes with a pluggable connector to use different HTTP client implementations
142-
through <<<HttpConnector>>>. In particular, this means you can use {{{https://square.github.io/okhttp/}OkHttp}},
142+
through <<<GitHubConnector>>>. In particular, this means you can use {{{https://square.github.io/okhttp/}OkHttp}}
143+
via <<<OkHttpGitHubConnector>>> (from the <<<org.kohsuke.github.extras.okhttp3>>> package),
143144
so we can make use of its HTTP response cache.
144145
Making a conditional request against the GitHub API and receiving a 304 response
145146
{{{https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests}does not count against the rate limit}}.
@@ -148,7 +149,8 @@ Pluggable HTTP client
148149

149150
+-----+
150151
Cache cache = new Cache(cacheDirectory, 10 * 1024 * 1024); // 10MB cache
152+
OkHttpClient client = new OkHttpClient.Builder().cache(cache).build();
151153
GitHub gitHub = GitHubBuilder.fromEnvironment()
152-
.withConnector(new OkHttpConnector(new OkUrlFactory(new OkHttpClient().setCache(cache))))
154+
.withConnector(new OkHttpGitHubConnector(client))
153155
.build();
154156
+-----+

src/test/java/org/kohsuke/github/GHIssueTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ public void createIssue() throws Exception {
169169
GHRepository repo = getRepository();
170170
GHIssue issue = repo.createIssue(name).body("## test").create();
171171
assertThat(issue.getTitle(), equalTo(name));
172+
assertThat(issue.getAuthorAssociation(), equalTo(GHCommentAuthorAssociation.NONE));
172173
}
173174

174175
/**

0 commit comments

Comments
 (0)