Skip to content

Commit

Permalink
FEAT:| Added/Updated [NewSecretScanningLocationWikiCommit, CreateSecr…
Browse files Browse the repository at this point in the history
…etScanningLocationWikiCommitFromDiscriminatorValue] (#55)

* New updates to generated code

* New updates to generated code

* New updates to generated code

* New updates to generated code

* New updates to generated code

---------

Co-authored-by: Octokit Bot <octokitbot@martynus.net>
  • Loading branch information
octokitbot and Octokit Bot authored Mar 22, 2024
1 parent 78392a3 commit 992b7fd
Show file tree
Hide file tree
Showing 28 changed files with 577 additions and 131 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ module github.com/octokit/go-sdk
go 1.21.5

require (
github.com/microsoft/kiota-abstractions-go v1.5.6
github.com/microsoft/kiota-http-go v1.3.2
github.com/microsoft/kiota-abstractions-go v1.6.0
github.com/microsoft/kiota-http-go v1.3.3
github.com/microsoft/kiota-serialization-form-go v1.0.0
github.com/microsoft/kiota-serialization-json-go v1.0.6
github.com/microsoft/kiota-serialization-json-go v1.0.7
github.com/microsoft/kiota-serialization-multipart-go v1.0.0
github.com/microsoft/kiota-serialization-text-go v1.0.0
)
Expand All @@ -18,8 +18,8 @@ require (
github.com/go-logr/stdr v1.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.50 // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/std-uritemplate/std-uritemplate/go v0.0.55 // indirect
github.com/stretchr/testify v1.9.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@ 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.5.6 h1:3hd1sACWB2B9grv8KG1T8g/gGQ4A8kTLv91OUxHSxkE=
github.com/microsoft/kiota-abstractions-go v1.5.6/go.mod h1:2WX7Oh8V9SAdZ80OGeE53rcbdys54Pd38rAeDUghrpM=
github.com/microsoft/kiota-http-go v1.3.2 h1:HSrbw6MDMmgLaqU1qT3SgdmD/18KPW2usfyUtE017Lw=
github.com/microsoft/kiota-http-go v1.3.2/go.mod h1:pEs3eLpCJBhsesjtvM/3T4ODKCofPgDlDsGHHetau2g=
github.com/microsoft/kiota-abstractions-go v1.6.0 h1:qbGBNMU0/o5myKbikCBXJFohVCFrrpx2cO15Rta2WyA=
github.com/microsoft/kiota-abstractions-go v1.6.0/go.mod h1:7YH20ZbRWXGfHSSvdHkdztzgCB9mRdtFx13+hrYIEpo=
github.com/microsoft/kiota-http-go v1.3.3 h1:FKjK5BLFONu5eIBxtrkirkixFQmcPwitZ8iwZHKbESo=
github.com/microsoft/kiota-http-go v1.3.3/go.mod h1:IWw/PwtBs/GYz+Pa75gPW7MFNFv0aKPFsLw5WqzL1SE=
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.6 h1:8v8IXMGurLCRYZs1l0Ck75lN0wzKDLko69mNdQGVWeQ=
github.com/microsoft/kiota-serialization-json-go v1.0.6/go.mod h1:I0CiXKgvKDFOO35lQ5VpYmd2nFLXHdJUsHnG8z/TX7A=
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-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=
github.com/microsoft/kiota-serialization-text-go v1.0.0/go.mod h1:sM1/C6ecnQ7IquQOGUrUldaO5wj+9+v7G2W3sQ3fy6M=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/std-uritemplate/std-uritemplate/go v0.0.50 h1:LAE6WYRmLlDXPtEzr152BnD/MHxGCKmcp5D2Pw0NvmU=
github.com/std-uritemplate/std-uritemplate/go v0.0.50/go.mod h1:CLZ1543WRCuUQQjK0BvPM4QrG2toY8xNZUm8Vbt7vTc=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/std-uritemplate/std-uritemplate/go v0.0.55 h1:muSH037g97K7U2f94G9LUuE8tZlJsoSSrPsO9V281WY=
github.com/std-uritemplate/std-uritemplate/go v0.0.55/go.mod h1:rG/bqh/ThY4xE5de7Rap3vaDkYUT76B0GPJ0loYeTTc=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo=
go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo=
go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI=
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": "DA6E75F17989092BF227D8F9183FC5A5F9B42B6C1168C39791EC5B3139F8746ABF842849DA6BA11C182C2EBE67F95FCA9B2A028275F16F6C4453ADFB0EE36A95",
"descriptionHash": "0DBCC4A4B322A39DBB2C9A0CDC70BFA5C0343176D1FD8245BB0A37391405F13D9F82DACA14AF8D750C70A6335D4FCE9A9E724A151E2AE2ABE634A0958869061B",
"descriptionLocation": "../../../source-generator/schemas/downloaded.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.12.0",
"kiotaVersion": "1.13.0-preview.202403210001",
"clientClassName": "ApiClient",
"clientNamespaceName": "github.com/octokit/go-sdk/pkg/github/",
"language": "Go",
Expand Down
14 changes: 5 additions & 9 deletions pkg/github/markdown/markdown_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,19 @@ func NewMarkdownRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee26337
return NewMarkdownRequestBuilderInternal(urlParams, requestAdapter)
}
// Post render a Markdown document
// returns a []byte when successful
// [API method documentation]
//
// [API method documentation]: https://docs.github.com/rest/markdown/markdown#render-a-markdown-document
func (m *MarkdownRequestBuilder) Post(ctx context.Context, body MarkdownPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]byte, error) {
func (m *MarkdownRequestBuilder) Post(ctx context.Context, body MarkdownPostRequestBodyable, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
return nil, err
return err
}
res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", nil)
err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil)
if err != nil {
return nil, err
}
if res == nil {
return nil, nil
return err
}
return res.([]byte), nil
return nil
}
// Raw the raw property
// returns a *RawRequestBuilder when successful
Expand Down
14 changes: 5 additions & 9 deletions pkg/github/markdown/raw_request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,19 @@ func NewRawRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb1c
return NewRawRequestBuilderInternal(urlParams, requestAdapter)
}
// Post you must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
// returns a []byte when successful
// [API method documentation]
//
// [API method documentation]: https://docs.github.com/rest/markdown/markdown#render-a-markdown-document-in-raw-mode
func (m *RawRequestBuilder) Post(ctx context.Context, body *string, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])([]byte, error) {
func (m *RawRequestBuilder) Post(ctx context.Context, body *string, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(error) {
requestInfo, err := m.ToPostRequestInformation(ctx, body, requestConfiguration);
if err != nil {
return nil, err
return err
}
res, err := m.BaseRequestBuilder.RequestAdapter.SendPrimitive(ctx, requestInfo, "[]byte", nil)
err = m.BaseRequestBuilder.RequestAdapter.SendNoContent(ctx, requestInfo, nil)
if err != nil {
return nil, err
return err
}
if res == nil {
return nil, nil
}
return res.([]byte), nil
return nil
}
// ToPostRequestInformation you must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less.
// returns a *RequestInformation when successful
Expand Down
58 changes: 58 additions & 0 deletions pkg/github/models/base_gist.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,16 @@ type BaseGist struct {
description *string
// The files property
files BaseGist_filesable
// The forks property
forks i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable
// The forks_url property
forks_url *string
// The git_pull_url property
git_pull_url *string
// The git_push_url property
git_push_url *string
// The history property
history i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable
// The html_url property
html_url *string
// The id property
Expand Down Expand Up @@ -152,6 +156,16 @@ func (m *BaseGist) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896
}
return nil
}
res["forks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetForks(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable))
}
return nil
}
res["forks_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -182,6 +196,16 @@ func (m *BaseGist) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896
}
return nil
}
res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetObjectValue(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.CreateUntypedNodeFromDiscriminatorValue)
if err != nil {
return err
}
if val != nil {
m.SetHistory(val.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable))
}
return nil
}
res["html_url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
Expand Down Expand Up @@ -279,6 +303,11 @@ func (m *BaseGist) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896
func (m *BaseGist) GetFiles()(BaseGist_filesable) {
return m.files
}
// GetForks gets the forks property value. The forks property
// returns a UntypedNodeable when successful
func (m *BaseGist) GetForks()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) {
return m.forks
}
// GetForksUrl gets the forks_url property value. The forks_url property
// returns a *string when successful
func (m *BaseGist) GetForksUrl()(*string) {
Expand All @@ -294,6 +323,11 @@ func (m *BaseGist) GetGitPullUrl()(*string) {
func (m *BaseGist) GetGitPushUrl()(*string) {
return m.git_push_url
}
// GetHistory gets the history property value. The history property
// returns a UntypedNodeable when successful
func (m *BaseGist) GetHistory()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable) {
return m.history
}
// GetHtmlUrl gets the html_url property value. The html_url property
// returns a *string when successful
func (m *BaseGist) GetHtmlUrl()(*string) {
Expand Down Expand Up @@ -377,6 +411,12 @@ func (m *BaseGist) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01
return err
}
}
{
err := writer.WriteObjectValue("forks", m.GetForks())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("forks_url", m.GetForksUrl())
if err != nil {
Expand All @@ -395,6 +435,12 @@ func (m *BaseGist) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c01
return err
}
}
{
err := writer.WriteObjectValue("history", m.GetHistory())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("html_url", m.GetHtmlUrl())
if err != nil {
Expand Down Expand Up @@ -485,6 +531,10 @@ func (m *BaseGist) SetDescription(value *string)() {
func (m *BaseGist) SetFiles(value BaseGist_filesable)() {
m.files = value
}
// SetForks sets the forks property value. The forks property
func (m *BaseGist) SetForks(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() {
m.forks = value
}
// SetForksUrl sets the forks_url property value. The forks_url property
func (m *BaseGist) SetForksUrl(value *string)() {
m.forks_url = value
Expand All @@ -497,6 +547,10 @@ func (m *BaseGist) SetGitPullUrl(value *string)() {
func (m *BaseGist) SetGitPushUrl(value *string)() {
m.git_push_url = value
}
// SetHistory sets the history property value. The history property
func (m *BaseGist) SetHistory(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)() {
m.history = value
}
// SetHtmlUrl sets the html_url property value. The html_url property
func (m *BaseGist) SetHtmlUrl(value *string)() {
m.html_url = value
Expand Down Expand Up @@ -542,9 +596,11 @@ type BaseGistable interface {
GetCreatedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
GetDescription()(*string)
GetFiles()(BaseGist_filesable)
GetForks()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)
GetForksUrl()(*string)
GetGitPullUrl()(*string)
GetGitPushUrl()(*string)
GetHistory()(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)
GetHtmlUrl()(*string)
GetId()(*string)
GetNodeId()(*string)
Expand All @@ -560,9 +616,11 @@ type BaseGistable interface {
SetCreatedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
SetDescription(value *string)()
SetFiles(value BaseGist_filesable)()
SetForks(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)()
SetForksUrl(value *string)()
SetGitPullUrl(value *string)()
SetGitPushUrl(value *string)()
SetHistory(value i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.UntypedNodeable)()
SetHtmlUrl(value *string)()
SetId(value *string)()
SetNodeId(value *string)()
Expand Down
Loading

0 comments on commit 992b7fd

Please sign in to comment.