File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ API documentation
77 client
88 users
99 issues
10+ pull_requests
1011 network
1112 repos
1213 commit
Original file line number Diff line number Diff line change 1+ Pull requests
2+ =============
3+
4+ .. py :currentmodule :: github2.pull_requests
5+
6+ .. autoclass :: PullRequest(type)
7+
8+ .. autoclass :: PullRequests(type)
9+
10+ Examples
11+ --------
12+
13+ Listing pull requests
14+ '''''''''''''''''''''
15+
16+ >>> results = github.pull_requests.list(" ask/python-github2" )
17+
18+ View a pull request
19+ '''''''''''''''''''
20+
21+ >>> request = github.pull_requests.show(" ask/python-github2" , 28 )
22+ >>> pull.body
23+ 'This implements the github API pull requests functionality. '
24+
25+ Open pull request
26+ '''''''''''''''''
27+
28+ To open a new pull request::
29+
30+ >>> pull = github.pull_requests.create("ask/python-github2", "master",
31+ ... "JNRowe:my_new_branch",
32+ ... title="Fancy features")
33+ >>> pull.number
34+ 4
35+
36+ To attach code to an existing issue::
37+
38+ >>> pull = github.pull_requests.create("ask/python-github2", "master",
39+ ... "JNRowe:my_new_branch",
40+ ... issue=4)
You can’t perform that action at this time.
0 commit comments