Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 955690b

Browse filesBrowse files
committed
Rename refreash to populate and add node_id for GHRepository
1 parent 263de14 commit 955690b
Copy full SHA for 955690b

File tree

Expand file treeCollapse file tree

3 files changed

+16
-5
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+16
-5
lines changed

‎src/main/java/org/kohsuke/github/GHEventPayload.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHEventPayload.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void wrapUp(GitHub root) {
259259
try {
260260
for (GHRepository singleRepo : repositories) { // warp each of the repository
261261
singleRepo.wrap(root);
262-
singleRepo.refresh();
262+
singleRepo.populate();
263263
}
264264
} catch (IOException e) {
265265
throw new GHException("Failed to refresh repositories", e);
@@ -346,7 +346,7 @@ void wrapUp(GitHub root) {
346346
try {
347347
for (GHRepository singleRepo : repositories) { // warp each of the repository
348348
singleRepo.wrap(root);
349-
singleRepo.refresh();
349+
singleRepo.populate();
350350
}
351351
} catch (IOException e) {
352352
throw new GHException("Failed to refresh repositories", e);

‎src/main/java/org/kohsuke/github/GHRepository.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHRepository.java
+12-3Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
public class GHRepository extends GHObject {
6666
/* package almost final */ GitHub root;
6767

68-
private String description, homepage, name, full_name;
68+
private String nodeId, description, homepage, name, full_name;
6969
private String html_url; // this is the UI
7070
/*
7171
* The license information makes use of the preview API.
@@ -185,6 +185,15 @@ private static class GHRepoPermission {
185185
boolean pull, push, admin;
186186
}
187187

188+
/**
189+
* Gets node id
190+
*
191+
* @return the node id
192+
*/
193+
public String getNodeId() {
194+
return nodeId;
195+
}
196+
188197
/**
189198
* Gets description.
190199
*
@@ -2794,12 +2803,12 @@ public GHTagObject createTag(String tag, String message, String object, String t
27942803
}
27952804

27962805
/**
2797-
* Repopulates this object.
2806+
* Populate this object.
27982807
*
27992808
* @throws java.io.IOException
28002809
* The IO exception
28012810
*/
2802-
public void refresh() throws IOException {
2811+
void populate() throws IOException {
28032812
if (root.isOffline())
28042813
return; // can't populate if the root is offline
28052814

‎src/test/java/org/kohsuke/github/GHEventPayloadTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/GHEventPayloadTest.java
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ public void InstallationRepositoriesEvent() throws Exception {
405405
assertThat(event.getRepositorySelection(), is("selected"));
406406

407407
assertThat(event.getRepositoriesAdded().get(0).getId(), is(186853007L));
408+
assertThat(event.getRepositoriesAdded().get(0).getNodeId(), is("MDEwOlJlcG9zaXRvcnkxODY4NTMwMDc="));
408409
assertThat(event.getRepositoriesAdded().get(0).getName(), is("Space"));
409410
assertThat(event.getRepositoriesAdded().get(0).getFullName(), is("Codertocat/Space"));
410411
assertThat(event.getRepositoriesAdded().get(0).isPrivate(), is(false));
@@ -424,6 +425,7 @@ public void InstallationEvent() throws Exception {
424425
assertThat(event.getInstallation().getAccount().getLogin(), is("octocat"));
425426

426427
assertThat(event.getRepositories().get(0).getId(), is(1296269L));
428+
assertThat(event.getRepositories().get(0).getNodeId(), is("MDEwOlJlcG9zaXRvcnkxODY4NTMwMDc="));
427429
assertThat(event.getRepositories().get(0).getName(), is("Hello-World"));
428430
assertThat(event.getRepositories().get(0).getFullName(), is("octocat/Hello-World"));
429431
assertThat(event.getRepositories().get(0).isPrivate(), is(false));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.