Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1528473

Browse files
tonytrgSamMorrowDrums
authored andcommitted
fix pr parsing
1 parent6fa8eaf commit1528473

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎pkg/github/repositories.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,9 +464,9 @@ func GetFileContents(getClient GetClientFn, getRawClient raw.GetRawClientFn, t t
464464

465465
rawOpts:=&raw.RawContentOpts{}
466466

467-
ifstrings.HasPrefix(path,"refs/pull/") {
468-
prNumber,ok:=strings.CutPrefix(path,"refs/pull/")
469-
ifok&&len(prNumber)>0 {
467+
ifstrings.HasPrefix(ref,"refs/pull/") {
468+
prNumber:=strings.TrimSuffix(strings.TrimPrefix(ref,"refs/pull/"),"/head")
469+
iflen(prNumber)>0 {
470470
// fetch the PR from the API to get the latest commit and use SHA
471471
githubClient,err:=getClient(ctx)
472472
iferr!=nil {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp