Skip to content

Commit 4d4a5da

Browse files
authored
fix bugs with fetching GitHub PRs (#162)
1 parent 99ba16f commit 4d4a5da

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ You can pass all the same arguments that you would to `git diff`, e.g.
5454
You can also use `webdiff` to view GitHub pull requests:
5555

5656
webdiff https://github.com/owner/repo/pull/123
57-
webdiff #123 # if you're in a git repo with a github remote
57+
webdiff '#123' # if you're in a git repo with a github remote
5858

5959
This will download the files relevant to the Pull Request and run `webdiff`.
6060

webdiff/argparser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def parse(args, version=None):
6262
# Or perhaps something simpler like '#292'?
6363
m = re.match(PULL_REQUEST_NUM_RE, args.dirs[0])
6464
if m:
65-
num = int(m.group(1))
66-
owner, repo, num = github_fetcher.get_pr_repo(num)
65+
num = m.group(1)
66+
owner, repo, num = github_fetcher.get_pr_repo(int(num))
6767

6868
if not owner:
6969
raise UsageError(

0 commit comments

Comments
 (0)