Skip to content
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

dep: Kiota library bump from 1.2.x to 1.12.x makes significant source structure updates. #23

Merged
merged 16 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ go 1.21.5

require (
github.com/kfcampbell/ghinstallation v0.0.6
github.com/microsoft/kiota-abstractions-go v1.6.1
github.com/microsoft/kiota-http-go v1.4.3
github.com/microsoft/kiota-abstractions-go v1.7.0
github.com/microsoft/kiota-http-go v1.4.5
github.com/microsoft/kiota-serialization-form-go v1.0.0
github.com/microsoft/kiota-serialization-json-go v1.0.7
github.com/microsoft/kiota-serialization-json-go v1.0.8
github.com/microsoft/kiota-serialization-multipart-go v1.0.0
github.com/microsoft/kiota-serialization-text-go v1.0.0
)
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/microsoft/kiota-abstractions-go v1.6.1 h1:NXK50S3BwJn9Wj6bO0YFuAig7y2WVgdQ/ie1ktMl2J4=
github.com/microsoft/kiota-abstractions-go v1.6.1/go.mod h1:FI1I2OHg0E7bK5t8DPnw+9C/CHVyLP6XeqDBT+95pTE=
github.com/microsoft/kiota-http-go v1.4.3 h1:BVviWZSZCm2nr9qySbhSXa8jlrLvCcC2/uV4p45Ow0I=
github.com/microsoft/kiota-http-go v1.4.3/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM=
github.com/microsoft/kiota-abstractions-go v1.7.0 h1:/0OKSSEe94Z1qgpcGE7ZFI9P+4iAnsDQo9v9UOk+R8E=
github.com/microsoft/kiota-abstractions-go v1.7.0/go.mod h1:FI1I2OHg0E7bK5t8DPnw+9C/CHVyLP6XeqDBT+95pTE=
github.com/microsoft/kiota-http-go v1.4.5 h1:BrI9TZ0cWiU1ucP5oSWR6UmP2vR3PaKbQ61TQ/qM5cM=
github.com/microsoft/kiota-http-go v1.4.5/go.mod h1:Kup5nMDD3a9sjdgRKHCqZWqtrv3FbprjcPaGjLR6FzM=
github.com/microsoft/kiota-serialization-form-go v1.0.0 h1:UNdrkMnLFqUCccQZerKjblsyVgifS11b3WCx+eFEsAI=
github.com/microsoft/kiota-serialization-form-go v1.0.0/go.mod h1:h4mQOO6KVTNciMF6azi1J9QB19ujSw3ULKcSNyXXOMA=
github.com/microsoft/kiota-serialization-json-go v1.0.7 h1:yMbckSTPrjZdM4EMXgzLZSA3CtDaUBI350u0VoYRz7Y=
github.com/microsoft/kiota-serialization-json-go v1.0.7/go.mod h1:1krrY7DYl3ivPIzl4xTaBpew6akYNa8/Tal8g+kb0cc=
github.com/microsoft/kiota-serialization-json-go v1.0.8 h1:+aViv9k6wqaw1Fx6P49fl5GIB1hN3b6CG0McNTcUYBc=
github.com/microsoft/kiota-serialization-json-go v1.0.8/go.mod h1:O8+v11U0EUwHlCz7hrW38KxDmdhKAHfv4Q89uvsBalY=
github.com/microsoft/kiota-serialization-multipart-go v1.0.0 h1:3O5sb5Zj+moLBiJympbXNaeV07K0d46IfuEd5v9+pBs=
github.com/microsoft/kiota-serialization-multipart-go v1.0.0/go.mod h1:yauLeBTpANk4L03XD985akNysG24SnRJGaveZf+p4so=
github.com/microsoft/kiota-serialization-text-go v1.0.0 h1:XOaRhAXy+g8ZVpcq7x7a0jlETWnWrEum0RhmbYrTFnA=
Expand Down
5,092 changes: 2,483 additions & 2,609 deletions pkg/github/.kiota.log

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion pkg/github/advisories/get_sort_query_parameter_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ type GetSortQueryParameterType int
const (
UPDATED_GETSORTQUERYPARAMETERTYPE GetSortQueryParameterType = iota
PUBLISHED_GETSORTQUERYPARAMETERTYPE
EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE
EPSS_PERCENTILE_GETSORTQUERYPARAMETERTYPE
)

func (i GetSortQueryParameterType) String() string {
return []string{"updated", "published"}[i]
return []string{"updated", "published", "epss_percentage", "epss_percentile"}[i]
}
func ParseGetSortQueryParameterType(v string) (any, error) {
result := UPDATED_GETSORTQUERYPARAMETERTYPE
Expand All @@ -16,6 +18,10 @@ func ParseGetSortQueryParameterType(v string) (any, error) {
result = UPDATED_GETSORTQUERYPARAMETERTYPE
case "published":
result = PUBLISHED_GETSORTQUERYPARAMETERTYPE
case "epss_percentage":
result = EPSS_PERCENTAGE_GETSORTQUERYPARAMETERTYPE
case "epss_percentile":
result = EPSS_PERCENTILE_GETSORTQUERYPARAMETERTYPE
default:
return nil, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type ItemCode_security_and_analysisPatchRequestBody struct {
dependabot_alerts_enabled_for_new_repositories *bool
// Whether secret scanning is automatically enabled for new repositories. For more information, see "[About secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/about-secret-scanning)."
secret_scanning_enabled_for_new_repositories *bool
// Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
secret_scanning_non_provider_patterns_enabled_for_new_repositories *bool
// The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`.
secret_scanning_push_protection_custom_link *string
// Whether secret scanning push protection is automatically enabled for new repositories. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
Expand Down Expand Up @@ -96,6 +98,16 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) GetFieldDeserializers()
}
return nil
}
res["secret_scanning_non_provider_patterns_enabled_for_new_repositories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetBoolValue()
if err != nil {
return err
}
if val != nil {
m.SetSecretScanningNonProviderPatternsEnabledForNewRepositories(val)
}
return nil
}
res["secret_scanning_push_protection_custom_link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -123,6 +135,11 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) GetFieldDeserializers()
func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningEnabledForNewRepositories()(*bool) {
return m.secret_scanning_enabled_for_new_repositories
}
// GetSecretScanningNonProviderPatternsEnabledForNewRepositories gets the secret_scanning_non_provider_patterns_enabled_for_new_repositories property value. Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
// returns a *bool when successful
func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningNonProviderPatternsEnabledForNewRepositories()(*bool) {
return m.secret_scanning_non_provider_patterns_enabled_for_new_repositories
}
// GetSecretScanningPushProtectionCustomLink gets the secret_scanning_push_protection_custom_link property value. The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`.
// returns a *string when successful
func (m *ItemCode_security_and_analysisPatchRequestBody) GetSecretScanningPushProtectionCustomLink()(*string) {
Expand Down Expand Up @@ -159,6 +176,12 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) Serialize(writer i878a8
return err
}
}
{
err := writer.WriteBoolValue("secret_scanning_non_provider_patterns_enabled_for_new_repositories", m.GetSecretScanningNonProviderPatternsEnabledForNewRepositories())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("secret_scanning_push_protection_custom_link", m.GetSecretScanningPushProtectionCustomLink())
if err != nil {
Expand Down Expand Up @@ -199,6 +222,10 @@ func (m *ItemCode_security_and_analysisPatchRequestBody) SetDependabotAlertsEnab
func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningEnabledForNewRepositories(value *bool)() {
m.secret_scanning_enabled_for_new_repositories = value
}
// SetSecretScanningNonProviderPatternsEnabledForNewRepositories sets the secret_scanning_non_provider_patterns_enabled_for_new_repositories property value. Whether secret scanning of non-provider patterns is enabled for new repositories under this enterprise.
func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningNonProviderPatternsEnabledForNewRepositories(value *bool)() {
m.secret_scanning_non_provider_patterns_enabled_for_new_repositories = value
}
// SetSecretScanningPushProtectionCustomLink sets the secret_scanning_push_protection_custom_link property value. The URL that will be displayed to contributors who are blocked from pushing a secret. For more information, see "[Protecting pushes with secret scanning](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/protecting-pushes-with-secret-scanning)."To disable this functionality, set this field to `null`.
func (m *ItemCode_security_and_analysisPatchRequestBody) SetSecretScanningPushProtectionCustomLink(value *string)() {
m.secret_scanning_push_protection_custom_link = value
Expand All @@ -214,12 +241,14 @@ type ItemCode_security_and_analysisPatchRequestBodyable interface {
GetAdvancedSecurityEnabledNewUserNamespaceRepos()(*bool)
GetDependabotAlertsEnabledForNewRepositories()(*bool)
GetSecretScanningEnabledForNewRepositories()(*bool)
GetSecretScanningNonProviderPatternsEnabledForNewRepositories()(*bool)
GetSecretScanningPushProtectionCustomLink()(*string)
GetSecretScanningPushProtectionEnabledForNewRepositories()(*bool)
SetAdvancedSecurityEnabledForNewRepositories(value *bool)()
SetAdvancedSecurityEnabledNewUserNamespaceRepos(value *bool)()
SetDependabotAlertsEnabledForNewRepositories(value *bool)()
SetSecretScanningEnabledForNewRepositories(value *bool)()
SetSecretScanningNonProviderPatternsEnabledForNewRepositories(value *bool)()
SetSecretScanningPushProtectionCustomLink(value *string)()
SetSecretScanningPushProtectionEnabledForNewRepositories(value *bool)()
}
4 changes: 2 additions & 2 deletions pkg/github/gists/item_comments_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type ItemCommentsRequestBuilderGetQueryParameters struct {
}
// ByComment_id gets an item from the github.com/octokit/go-sdk-enterprise-cloud/pkg/github.gists.item.comments.item collection
// returns a *ItemCommentsWithComment_ItemRequestBuilder when successful
func (m *ItemCommentsRequestBuilder) ByComment_id(comment_id int32)(*ItemCommentsWithComment_ItemRequestBuilder) {
func (m *ItemCommentsRequestBuilder) ByComment_id(comment_id int64)(*ItemCommentsWithComment_ItemRequestBuilder) {
urlTplParams := make(map[string]string)
for idx, item := range m.BaseRequestBuilder.PathParameters {
urlTplParams[idx] = item
}
urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(int64(comment_id), 10)
urlTplParams["comment_id"] = i53ac87e8cb3cc9276228f74d38694a208cacb99bb8ceb705eeae99fb88d4d274.FormatInt(comment_id, 10)
return NewItemCommentsWithComment_ItemRequestBuilderInternal(urlTplParams, m.BaseRequestBuilder.RequestAdapter)
}
// NewItemCommentsRequestBuilderInternal instantiates a new ItemCommentsRequestBuilder and sets the default values.
Expand Down
4 changes: 2 additions & 2 deletions pkg/github/kiota-lock.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"descriptionHash": "F0EA7EF2FC507B20861DFEA86E9DD6DE1D81238B7C598E851FFB9F036B21762DC44F84BD97422EFA1BA56DADAFA46BFE370EB5D7E60BBA1B402193C8D2F0F7FB",
"descriptionHash": "28846D5BC35F098F6CC043EBD2CD0315C25D925DC86BA346879A8319E9FAE68DC0D6F517E8C766773C3C2E526B85023F15C0276F6295FF9021BB198C58CC010C",
"descriptionLocation": "../../../../../schemas/ghec.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.17.0",
"kiotaVersion": "1.18.0",
"clientClassName": "ApiClient",
"clientNamespaceName": "github.com/octokit/go-sdk-enterprise-cloud/pkg/github",
"language": "Go",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package models
// The enablement status of secret scanning non-provider patterns
type CodeSecurityConfiguration_secret_scanning_non_provider_patterns int

const (
ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS CodeSecurityConfiguration_secret_scanning_non_provider_patterns = iota
DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
)

func (i CodeSecurityConfiguration_secret_scanning_non_provider_patterns) String() string {
return []string{"enabled", "disabled", "not_set"}[i]
}
func ParseCodeSecurityConfiguration_secret_scanning_non_provider_patterns(v string) (any, error) {
result := ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
switch v {
case "enabled":
result = ENABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
case "disabled":
result = DISABLED_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
case "not_set":
result = NOT_SET_CODESECURITYCONFIGURATION_SECRET_SCANNING_NON_PROVIDER_PATTERNS
default:
return nil, nil
}
return &result, nil
}
func SerializeCodeSecurityConfiguration_secret_scanning_non_provider_patterns(values []CodeSecurityConfiguration_secret_scanning_non_provider_patterns) []string {
result := make([]string, len(values))
for i, v := range values {
result[i] = v.String()
}
return result
}
func (i CodeSecurityConfiguration_secret_scanning_non_provider_patterns) isMultiValue() bool {
return false
}
35 changes: 35 additions & 0 deletions pkg/github/models/api_overview.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ type ApiOverview struct {
additionalData map[string]any
// The api property
api []string
// The codespaces property
codespaces []string
// The copilot property
copilot []string
// The dependabot property
Expand Down Expand Up @@ -73,6 +75,11 @@ func (m *ApiOverview) GetAdditionalData()(map[string]any) {
func (m *ApiOverview) GetApi()([]string) {
return m.api
}
// GetCodespaces gets the codespaces property value. The codespaces property
// returns a []string when successful
func (m *ApiOverview) GetCodespaces()([]string) {
return m.codespaces
}
// GetCopilot gets the copilot property value. The copilot property
// returns a []string when successful
func (m *ApiOverview) GetCopilot()([]string) {
Expand Down Expand Up @@ -140,6 +147,22 @@ func (m *ApiOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26
}
return nil
}
res["codespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
return err
}
if val != nil {
res := make([]string, len(val))
for i, v := range val {
if v != nil {
res[i] = *(v.(*string))
}
}
m.SetCodespaces(res)
}
return nil
}
res["copilot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetCollectionOfPrimitiveValues("string")
if err != nil {
Expand Down Expand Up @@ -402,6 +425,12 @@ func (m *ApiOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6
return err
}
}
if m.GetCodespaces() != nil {
err := writer.WriteCollectionOfStringValues("codespaces", m.GetCodespaces())
if err != nil {
return err
}
}
if m.GetCopilot() != nil {
err := writer.WriteCollectionOfStringValues("copilot", m.GetCopilot())
if err != nil {
Expand Down Expand Up @@ -504,6 +533,10 @@ func (m *ApiOverview) SetAdditionalData(value map[string]any)() {
func (m *ApiOverview) SetApi(value []string)() {
m.api = value
}
// SetCodespaces sets the codespaces property value. The codespaces property
func (m *ApiOverview) SetCodespaces(value []string)() {
m.codespaces = value
}
// SetCopilot sets the copilot property value. The copilot property
func (m *ApiOverview) SetCopilot(value []string)() {
m.copilot = value
Expand Down Expand Up @@ -562,6 +595,7 @@ type ApiOverviewable interface {
GetActions()([]string)
GetActionsMacos()([]string)
GetApi()([]string)
GetCodespaces()([]string)
GetCopilot()([]string)
GetDependabot()([]string)
GetDomains()(ApiOverview_domainsable)
Expand All @@ -578,6 +612,7 @@ type ApiOverviewable interface {
SetActions(value []string)()
SetActionsMacos(value []string)()
SetApi(value []string)()
SetCodespaces(value []string)()
SetCopilot(value []string)()
SetDependabot(value []string)()
SetDomains(value ApiOverview_domainsable)()
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/models/code_scanning_alert_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type CodeScanningAlertRule struct {
additionalData map[string]any
// A short description of the rule used to detect the alert.
description *string
// description of the rule used to detect the alert.
// A description of the rule used to detect the alert.
full_description *string
// Detailed documentation for the rule as GitHub Flavored Markdown.
help *string
Expand Down Expand Up @@ -150,7 +150,7 @@ func (m *CodeScanningAlertRule) GetFieldDeserializers()(map[string]func(i878a80d
}
return res
}
// GetFullDescription gets the full_description property value. description of the rule used to detect the alert.
// GetFullDescription gets the full_description property value. A description of the rule used to detect the alert.
// returns a *string when successful
func (m *CodeScanningAlertRule) GetFullDescription()(*string) {
return m.full_description
Expand Down Expand Up @@ -264,7 +264,7 @@ func (m *CodeScanningAlertRule) SetAdditionalData(value map[string]any)() {
func (m *CodeScanningAlertRule) SetDescription(value *string)() {
m.description = value
}
// SetFullDescription sets the full_description property value. description of the rule used to detect the alert.
// SetFullDescription sets the full_description property value. A description of the rule used to detect the alert.
func (m *CodeScanningAlertRule) SetFullDescription(value *string)() {
m.full_description = value
}
Expand Down
Loading
Loading