diff options
| author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-07-30 02:19:32 +1000 |
|---|---|---|
| committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-07-30 02:19:32 +1000 |
| commit | d4445fe189480e272ad247860255194d413095dd (patch) | |
| tree | e08ffbc07d27ebd6f6af677c7ee8ef7347ac1792 /src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java | |
| parent | 6115246bf36fb98037ca0df2faac869eba7845c3 (diff) | |
| download | notenoughupdates-d4445fe189480e272ad247860255194d413095dd.tar.gz notenoughupdates-d4445fe189480e272ad247860255194d413095dd.tar.bz2 notenoughupdates-d4445fe189480e272ad247860255194d413095dd.zip | |
1.0.3
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java index b9f086a4..f272ee29 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUIO.java @@ -63,6 +63,19 @@ public class NEUIO { } } + public String getLatestCommit() { + try { + GitHub github = new GitHubBuilder().withOAuthToken(accessToken).build(); + GHRepository repo = github.getRepositoryById("247692460"); + for(GHCommit commit : repo.listCommits()) { + return commit.getSHA1(); + } + } catch(IOException e) { + return null; + } + return ""; + } + /** * @param oldShas Map from filename (eg. BOW.json) to the sha in the local repository * @return Map from filename to the new shas |
