Skip to content

Commit cff67b0

Browse files
committed
Merge remote origin changes and resolve project tool conflicts
1 parent 86abab2 commit cff67b0

File tree

3 files changed

+55
-67
lines changed

3 files changed

+55
-67
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ require (
5050
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
5151
gopkg.in/yaml.v2 v2.4.0 // indirect
5252
gopkg.in/yaml.v3 v3.0.1 // indirect
53-
)
53+
)

pkg/github/__toolsnaps__/projects_write.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"type": "number"
1212
},
1313
"item_id": {
14-
"description": "The project item ID. Required for 'update_project_item' and 'delete_project_item' methods. For add_project_item, this is the numeric ID of the issue or pull request to add.",
14+
"description": "The project item ID. Required for 'update_project_item' and 'delete_project_item' methods.",
1515
"type": "number"
1616
},
1717
"item_owner": {

pkg/github/projects.go

Lines changed: 53 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,21 +1478,21 @@ func listProjects(ctx context.Context, client *github.Client, args map[string]an
14781478
projects, resp, err = client.Projects.ListOrganizationProjects(ctx, owner, opts)
14791479
if err != nil {
14801480
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1481-
"failed to list projects",
1482-
resp,
1483-
err,
1484-
),
1485-
nil, nil
1481+
"failed to list projects",
1482+
resp,
1483+
err,
1484+
),
1485+
nil, nil
14861486
}
14871487
default:
14881488
projects, resp, err = client.Projects.ListUserProjects(ctx, owner, opts)
14891489
if err != nil {
14901490
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1491-
"failed to list projects",
1492-
resp,
1493-
err,
1494-
),
1495-
nil, nil
1491+
"failed to list projects",
1492+
resp,
1493+
err,
1494+
),
1495+
nil, nil
14961496
}
14971497
}
14981498

@@ -1600,11 +1600,11 @@ func listProjectFields(ctx context.Context, client *github.Client, args map[stri
16001600

16011601
if err != nil {
16021602
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1603-
"failed to list project fields",
1604-
resp,
1605-
err,
1606-
),
1607-
nil, nil
1603+
"failed to list project fields",
1604+
resp,
1605+
err,
1606+
),
1607+
nil, nil
16081608
}
16091609
defer func() { _ = resp.Body.Close() }()
16101610

@@ -1666,11 +1666,11 @@ func listProjectItems(ctx context.Context, client *github.Client, args map[strin
16661666

16671667
if err != nil {
16681668
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1669-
ProjectListFailedError,
1670-
resp,
1671-
err,
1672-
),
1673-
nil, nil
1669+
ProjectListFailedError,
1670+
resp,
1671+
err,
1672+
),
1673+
nil, nil
16741674
}
16751675
defer func() { _ = resp.Body.Close() }()
16761676

@@ -1699,11 +1699,11 @@ func getProject(ctx context.Context, client *github.Client, owner, ownerType str
16991699
}
17001700
if err != nil {
17011701
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1702-
"failed to get project",
1703-
resp,
1704-
err,
1705-
),
1706-
nil, nil
1702+
"failed to get project",
1703+
resp,
1704+
err,
1705+
),
1706+
nil, nil
17071707
}
17081708
defer func() { _ = resp.Body.Close() }()
17091709

@@ -1737,11 +1737,11 @@ func getProjectField(ctx context.Context, client *github.Client, owner, ownerTyp
17371737

17381738
if err != nil {
17391739
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1740-
"failed to get project field",
1741-
resp,
1742-
err,
1743-
),
1744-
nil, nil
1740+
"failed to get project field",
1741+
resp,
1742+
err,
1743+
),
1744+
nil, nil
17451745
}
17461746
defer func() { _ = resp.Body.Close() }()
17471747

@@ -1780,11 +1780,11 @@ func getProjectItem(ctx context.Context, client *github.Client, owner, ownerType
17801780

17811781
if err != nil {
17821782
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1783-
"failed to get project item",
1784-
resp,
1785-
err,
1786-
),
1787-
nil, nil
1783+
"failed to get project item",
1784+
resp,
1785+
err,
1786+
),
1787+
nil, nil
17881788
}
17891789
defer func() { _ = resp.Body.Close() }()
17901790

@@ -1821,11 +1821,11 @@ func updateProjectItem(ctx context.Context, client *github.Client, owner, ownerT
18211821

18221822
if err != nil {
18231823
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1824-
ProjectUpdateFailedError,
1825-
resp,
1826-
err,
1827-
),
1828-
nil, nil
1824+
ProjectUpdateFailedError,
1825+
resp,
1826+
err,
1827+
),
1828+
nil, nil
18291829
}
18301830
defer func() { _ = resp.Body.Close() }()
18311831

@@ -1856,11 +1856,11 @@ func deleteProjectItem(ctx context.Context, client *github.Client, owner, ownerT
18561856

18571857
if err != nil {
18581858
return ghErrors.NewGitHubAPIErrorResponse(ctx,
1859-
ProjectDeleteFailedError,
1860-
resp,
1861-
err,
1862-
),
1863-
nil, nil
1859+
ProjectDeleteFailedError,
1860+
resp,
1861+
err,
1862+
),
1863+
nil, nil
18641864
}
18651865
defer func() { _ = resp.Body.Close() }()
18661866

@@ -2021,7 +2021,7 @@ func buildUpdateProjectItem(input map[string]any) (*github.UpdateProjectItemOpti
20212021
}
20222022

20232023
payload := &github.UpdateProjectItemOptions{
2024-
Fields: []*github.UpdateProjectV2Field{{
2024+
Fields: []*github.UpdateProjectV2Field{{
20252025
ID: fieldID,
20262026
Value: valueField,
20272027
}},
@@ -2494,38 +2494,26 @@ func getProjectNodeID(ctx context.Context, client *github.Client, owner, ownerTy
24942494

24952495
}
24962496

2497-
2498-
24992497
type UpdateProjectV2FieldInput struct {
2498+
ProjectID githubv4.ID `json:"projectId"`
25002499

2501-
ProjectID githubv4.ID `json:"projectId"`
2502-
2503-
FieldID githubv4.ID `json:"fieldId"`
2500+
FieldID githubv4.ID `json:"fieldId"`
25042501

25052502
IterationConfiguration *ProjectV2IterationFieldConfigurationInput `json:"iterationConfiguration,omitempty"`
2506-
25072503
}
25082504

2509-
2510-
25112505
type ProjectV2IterationFieldConfigurationInput struct {
2506+
Duration githubv4.Int `json:"duration"`
25122507

2513-
Duration githubv4.Int `json:"duration"`
2514-
2515-
StartDate githubv4.Date `json:"startDate"`
2508+
StartDate githubv4.Date `json:"startDate"`
25162509

25172510
Iterations *[]ProjectV2IterationFieldIterationInput `json:"iterations"`
2518-
25192511
}
25202512

2521-
2522-
25232513
type ProjectV2IterationFieldIterationInput struct {
2514+
StartDate githubv4.Date `json:"startDate"`
25242515

2525-
StartDate githubv4.Date `json:"startDate"`
2526-
2527-
Duration githubv4.Int `json:"duration"`
2528-
2529-
Title githubv4.String `json:"title"`
2516+
Duration githubv4.Int `json:"duration"`
25302517

2518+
Title githubv4.String `json:"title"`
25312519
}

0 commit comments

Comments
 (0)