Created
February 24, 2016 17:17
-
-
Save Novakov/f466d8104cbd76d22516 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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