refactor(agent-task/capi): populate PRs IsDraft
Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
parent
1e36e9f1e3
commit
4e1fcf1da9
2 changed files with 14 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ type sessionPullRequest struct {
|
|||
State string
|
||||
URL string
|
||||
Body string
|
||||
IsDraft bool
|
||||
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
|
|
@ -252,6 +253,7 @@ func (c *CAPIClient) hydrateSessionPullRequestsAndUsers(sessions []session) ([]*
|
|||
Number: node.PullRequest.Number,
|
||||
Title: node.PullRequest.Title,
|
||||
State: node.PullRequest.State,
|
||||
IsDraft: node.PullRequest.IsDraft,
|
||||
URL: node.PullRequest.URL,
|
||||
Body: node.PullRequest.Body,
|
||||
CreatedAt: node.PullRequest.CreatedAt,
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ func TestListSessionsForViewer(t *testing.T) {
|
|||
"number": 42,
|
||||
"title": "Improve docs",
|
||||
"state": "OPEN",
|
||||
"isDraft": true,
|
||||
"url": "https://github.com/OWNER/REPO/pull/42",
|
||||
"body": "",
|
||||
"createdAt": "%[1]s",
|
||||
|
|
@ -141,6 +142,7 @@ func TestListSessionsForViewer(t *testing.T) {
|
|||
Number: 42,
|
||||
Title: "Improve docs",
|
||||
State: "OPEN",
|
||||
IsDraft: true,
|
||||
URL: "https://github.com/OWNER/REPO/pull/42",
|
||||
Body: "",
|
||||
CreatedAt: sampleDate,
|
||||
|
|
@ -236,6 +238,7 @@ func TestListSessionsForViewer(t *testing.T) {
|
|||
"number": 42,
|
||||
"title": "Improve docs",
|
||||
"state": "OPEN",
|
||||
"isDraft": true,
|
||||
"url": "https://github.com/OWNER/REPO/pull/42",
|
||||
"body": "",
|
||||
"createdAt": "%[1]s",
|
||||
|
|
@ -251,6 +254,7 @@ func TestListSessionsForViewer(t *testing.T) {
|
|||
"number": 43,
|
||||
"title": "Improve docs",
|
||||
"state": "OPEN",
|
||||
"isDraft": true,
|
||||
"url": "https://github.com/OWNER/REPO/pull/43",
|
||||
"body": "",
|
||||
"createdAt": "%[1]s",
|
||||
|
|
@ -293,6 +297,7 @@ func TestListSessionsForViewer(t *testing.T) {
|
|||
Number: 42,
|
||||
Title: "Improve docs",
|
||||
State: "OPEN",
|
||||
IsDraft: true,
|
||||
URL: "https://github.com/OWNER/REPO/pull/42",
|
||||
Body: "",
|
||||
CreatedAt: sampleDate,
|
||||
|
|
@ -325,6 +330,7 @@ func TestListSessionsForViewer(t *testing.T) {
|
|||
Number: 43,
|
||||
Title: "Improve docs",
|
||||
State: "OPEN",
|
||||
IsDraft: true,
|
||||
URL: "https://github.com/OWNER/REPO/pull/43",
|
||||
Body: "",
|
||||
CreatedAt: sampleDate,
|
||||
|
|
@ -528,6 +534,7 @@ func TestListSessionsForRepo(t *testing.T) {
|
|||
"number": 42,
|
||||
"title": "Improve docs",
|
||||
"state": "OPEN",
|
||||
"isDraft": true,
|
||||
"url": "https://github.com/OWNER/REPO/pull/42",
|
||||
"body": "",
|
||||
"createdAt": "%[1]s",
|
||||
|
|
@ -570,6 +577,7 @@ func TestListSessionsForRepo(t *testing.T) {
|
|||
Number: 42,
|
||||
Title: "Improve docs",
|
||||
State: "OPEN",
|
||||
IsDraft: true,
|
||||
URL: "https://github.com/OWNER/REPO/pull/42",
|
||||
Body: "",
|
||||
CreatedAt: sampleDate,
|
||||
|
|
@ -665,6 +673,7 @@ func TestListSessionsForRepo(t *testing.T) {
|
|||
"number": 42,
|
||||
"title": "Improve docs",
|
||||
"state": "OPEN",
|
||||
"isDraft": true,
|
||||
"url": "https://github.com/OWNER/REPO/pull/42",
|
||||
"body": "",
|
||||
"createdAt": "%[1]s",
|
||||
|
|
@ -680,6 +689,7 @@ func TestListSessionsForRepo(t *testing.T) {
|
|||
"number": 43,
|
||||
"title": "Improve docs",
|
||||
"state": "OPEN",
|
||||
"isDraft": true,
|
||||
"url": "https://github.com/OWNER/REPO/pull/43",
|
||||
"body": "",
|
||||
"createdAt": "%[1]s",
|
||||
|
|
@ -722,6 +732,7 @@ func TestListSessionsForRepo(t *testing.T) {
|
|||
Number: 42,
|
||||
Title: "Improve docs",
|
||||
State: "OPEN",
|
||||
IsDraft: true,
|
||||
URL: "https://github.com/OWNER/REPO/pull/42",
|
||||
Body: "",
|
||||
CreatedAt: sampleDate,
|
||||
|
|
@ -754,6 +765,7 @@ func TestListSessionsForRepo(t *testing.T) {
|
|||
Number: 43,
|
||||
Title: "Improve docs",
|
||||
State: "OPEN",
|
||||
IsDraft: true,
|
||||
URL: "https://github.com/OWNER/REPO/pull/43",
|
||||
Body: "",
|
||||
CreatedAt: sampleDate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue