Skip to content

Commit 4b1909d

Browse files
committed
improve
1 parent 021a3d8 commit 4b1909d

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

pairing/pkg/cmd/pair.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func getCurrentPRInfo() (string, string, error) {
9999
}
100100
if len(jobSpec.Refs.Pulls) == 1 {
101101
pull := jobSpec.Refs.Pulls[0]
102-
return pull.Author, pull.Author, nil
102+
return pull.Author, pull.HeadRef, nil
103103
} else {
104104
return "", "", fmt.Errorf("no pull request data found or more than one pull found")
105105
}

pairing/pkg/cmd/types.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cmd
22

33
type Pull struct {
44
Author string `json:"author"`
5-
Number int `json:"number"`
65
HeadRef string `json:"head_ref"`
76
}
87

@@ -13,11 +12,3 @@ type Refs struct {
1312
type JobSpec struct {
1413
Refs Refs `json:"refs"`
1514
}
16-
17-
type PullRequestMetadata struct {
18-
Author string
19-
Organization string
20-
RepoName string
21-
BranchName string
22-
RemoteName string
23-
}

0 commit comments

Comments
 (0)