Skip to content

feat: Add support for Issue Types API #3525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ff58ec2
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 20, 2025
b2f14c8
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 20, 2025
5da58b1
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
0b1dc04
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
f4ab50f
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
9b50e82
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
4f5c3ec
feat(actions): add support for GitHub-hosted runner API endpoints
atilsensalduz Feb 21, 2025
6ecf469
feat: Refactor hosted runner request handling: Use shared struct and …
atilsensalduz Feb 25, 2025
5167f45
feat: Refactor hosted runner request handling: Use shared struct and …
atilsensalduz Feb 25, 2025
65910b7
feat: Refactor hosted runner request handling: Use shared struct and …
atilsensalduz Feb 25, 2025
22d4aba
refactor: improve error handling by preserving the original error con…
atilsensalduz Feb 26, 2025
a2199bb
refactor: improve error handling by preserving the original error con…
atilsensalduz Feb 26, 2025
69acb87
Merge branch 'google:master' into master
atilsensalduz Mar 19, 2025
56f4c18
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
cca495e
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
15b891e
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
f605f76
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
72f1988
Merge branch 'master' into add-issue-type
atilsensalduz Mar 20, 2025
d39244c
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
8a6fa7d
feat: add support for Issue Types API
atilsensalduz Mar 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: add support for Issue Types API
- Implement functions to interact with the Issue Types API:
  - ListIssueTypes: Retrieve all issue types for an organization.
  - CreateIssueType: Add a new issue type to an organization.
  - UpdateIssueType: Modify an existing issue type.
  - DeleteIssueType: Remove an issue type from an organization.

- Add corresponding tests for each function to ensure reliability.

References:
- GitHub REST API documentation: https://docs.github.com/en/rest/orgs/issue-types
- Related issue: #3523

Signed-off-by: atilsensalduz <[email protected]>
  • Loading branch information
atilsensalduz committed Mar 20, 2025
commit 8a6fa7d499db57a7f8a4910c0d9264e01c509c5a
16 changes: 0 additions & 16 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 0 additions & 22 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions github/orgs_issue_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

// CreateOrUpdateIssueTypesOptions represents the parameters for creating or updating an issue type.
type CreateOrUpdateIssueTypesOptions struct {
Name *string `json:"name"` // Name of the issue type. (Required.)
IsEnabled *bool `json:"is_enabled"` // Whether or not the issue type is enabled at the organization level. (Required.)
Name string `json:"name"` // Name of the issue type. (Required.)
IsEnabled bool `json:"is_enabled"` // Whether or not the issue type is enabled at the organization level. (Required.)
IsPrivate *bool `json:"is_private,omitempty"` // Whether or not the issue type is restricted to issues in private repositories. (Optional.)
Description *string `json:"description,omitempty"` // Description of the issue type. (Optional.)
Color *string `json:"color,omitempty"` // Color for the issue type. Can be one of "gray", "blue", green "orange", "red", "pink", "purple", "null". (Optional.)
Expand Down
8 changes: 4 additions & 4 deletions github/orgs_issue_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ func TestOrganizationsService_CreateIssueType(t *testing.T) {
client, mux, _ := setup(t)

input := &CreateOrUpdateIssueTypesOptions{
Name: Ptr("Epic"),
Name: "Epic",
Description: Ptr("An issue type for a multi-week tracking of work"),
IsEnabled: Ptr(true),
IsEnabled: true,
Color: Ptr("green"),
IsPrivate: Ptr(true),
}
Expand Down Expand Up @@ -153,9 +153,9 @@ func TestOrganizationsService_UpdateIssueType(t *testing.T) {
client, mux, _ := setup(t)

input := &CreateOrUpdateIssueTypesOptions{
Name: Ptr("Epic"),
Name: "Epic",
Description: Ptr("An issue type for a multi-week tracking of work"),
IsEnabled: Ptr(true),
IsEnabled: true,
Color: Ptr("green"),
IsPrivate: Ptr(true),
}
Expand Down
Loading