Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit eeebfd5

Browse files
committed
added a little helper code that generates an OAuth token for ~/.github
1 parent 5e3d3dd commit eeebfd5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/java/Foo.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import org.kohsuke.github.GitHub;
2+
3+
import java.util.Arrays;
4+
5+
/**
6+
* @author Kohsuke Kawaguchi
7+
*/
8+
public class Foo {
9+
public static void main(String[] args) throws Exception {
10+
System.out.println(GitHub.connect().createToken(
11+
Arrays.asList("user", "repo", "delete_repo", "notifications", "gist"), "GitHub API", null).getToken());
12+
}
13+
}

0 commit comments

Comments
 (0)