Skip to content

Commit

Permalink
Update pygithub_method.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbain committed Feb 17, 2016
1 parent 6657a18 commit b90dfc2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pygithub_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ Here is a workflow making use of [pygithub](https://github.com/PyGitHub/PyGithub
from github import Github
g = Github(user,pass) #or, g=Github(token) where token is personal Oauth token
u= g.get_user()
u.create_repo('new_repo')
my_new_repo=u.create_repo('new_repo')
# then use stash to pull from github.
```

or, to Fork an existing repo
2) Fork an existing repo

```python
other_repo = g.get_repo('cclauss/GitHub-web-plus-app-workflow')
mine=u.fork_repo(other_repo)
```

Create a pull request (after using stash to push to your own github)
3) Create a pull request (after using stash to push to your own github)
```python
# call create_pull on the repo you want to pull INTO. base = name of branch in that repo. head = name of YOUR repo, as user:branch
other_repo.create_pull(title='A web-free example, using only python',
Expand Down

0 comments on commit b90dfc2

Please sign in to comment.