Skip to content

Instantly share code, notes, and snippets.

@Novakov

Novakov/Program.java

Created Feb 24, 2016
Embed
What would you like to do?
package test;
import java.io.IOException;
import org.kohsuke.github.GHCommitState;
import org.kohsuke.github.GHRepository;
import org.kohsuke.github.GitHub;
public class Program {
public static void main(String[] args) throws IOException {
String hash = "5c95c2264419487556af894e9338214354e8057a";
String targetUrl = "http://my-jenkins";
String description = "OK!";
GitHub gh = GitHub.connectUsingOAuth("<oauth-token>");
GHRepository repo = gh.getRepository("Novakov/jenkins-github-test");
repo.createCommitStatus(hash, GHCommitState.SUCCESS, targetUrl, description, "github-commit-notify/build");
System.out.println(repo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment