Skip to content

Commit 887ca77

Browse files
committed
switching to Markdown
1 parent 4528659 commit 887ca77

3 files changed

Lines changed: 37 additions & 26 deletions

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.kohsuke</groupId>
55
<artifactId>pom</artifactId>
6-
<version>3</version>
6+
<version>4</version>
77
</parent>
88

99
<artifactId>github-api</artifactId>

src/site/apt/index.apt

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/site/markdown/index.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
What is this?
2+
=====
3+
4+
This library defines an object oriented representation of the GitHub API. By "object oriented" we mean
5+
there are classes that correspond to the domain model of GitHub (such as `GHUser` and `GHRepository`),
6+
operations that act on them as defined as methods (such as `GHUser.follow()`), and those object references
7+
are used in favor of using string handle (such as `GHUser.isMemberOf(GHOrganization)` instead of
8+
`GHUser.isMemberOf(String)`)
9+
10+
There are some corners of the GitHub API that's not yet implemented, but
11+
the library is implemented with the right abstractions and libraries to make it very easy to improve the coverage.
12+
13+
Sample Usage
14+
-----
15+
16+
GitHub github = GitHub.connect();
17+
GHRepository repo = github.createRepository(
18+
"new-repository","this is my new repository",
19+
"http://www.kohsuke.org/",true/*public*/);
20+
repo.addCollaborators(github.getUser("abayer"),github.getUser("rtyler"));
21+
repo.delete();
22+
23+
Credential
24+
----
25+
26+
This library allows the caller to supply the credential as parameters, but it also defines a common convention
27+
so that applications using this library will look at the consistent location. In this convention, the library
28+
looks at `~/.github` property file, which should have the following two values:
29+
30+
login=kohsuke
31+
password=012345678
32+
33+
Alternatively, you can have just the OAuth token in this file:
34+
35+
oauth=4d98173f7c075527cb64878561d1fe70
36+

0 commit comments

Comments
 (0)