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

FEAT: Added/Updated [timeline docs], adds statuses of waiting, requested, and pending to checkrun #54

Merged
merged 2 commits into from Mar 15, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/github/feeds/feeds_request_builder.go
Expand Up @@ -23,7 +23,7 @@ func NewFeedsRequestBuilder(rawUrl string, requestAdapter i2ae4187f7daee263371cb
urlParams["request-raw-url"] = rawUrl
return NewFeedsRequestBuilderInternal(urlParams, requestAdapter)
}
// Get gitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
// Get lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
// returns a Feedable when successful
// [API method documentation]
//
Expand All @@ -42,7 +42,7 @@ func (m *FeedsRequestBuilder) Get(ctx context.Context, requestConfiguration *i2a
}
return res.(i59ea7d99994c6a4bb9ef742ed717844297d055c7fd3742131406eea67a6404b6.Feedable), nil
}
// ToGetRequestInformation gitHub provides several timeline resources in [Atom](http://en.wikipedia.org/wiki/Atom_(standard)) format. The Feeds API lists all the feeds available to the authenticated user:* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
// ToGetRequestInformation lists the feeds available to the authenticated user. The response provides a URL for each feed. You can then get a specific feed by sending a request to one of the feed URLs.* **Timeline**: The GitHub global public timeline* **User**: The public timeline for any user, using `uri_template`. For more information, see "[Hypermedia](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia)."* **Current user public**: The public timeline for the authenticated user* **Current user**: The private timeline for the authenticated user* **Current user actor**: The private timeline for activity created by the authenticated user* **Current user organizations**: The private timeline for the organizations the authenticated user is a member of.* **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub.By default, timeline resources are returned in JSON. You can specify the `application/atom+xml` type in the `Accept` header to return timeline resources in Atom format. For more information, see "[Media types](https://docs.github.com/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."**Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens.
// returns a *RequestInformation when successful
func (m *FeedsRequestBuilder) ToGetRequestInformation(ctx context.Context, requestConfiguration *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestConfiguration[i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.DefaultQueryParameters])(*i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.RequestInformation, error) {
requestInfo := i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewRequestInformationWithMethodAndUrlTemplateAndPathParameters(i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.GET, m.BaseRequestBuilder.UrlTemplate, m.BaseRequestBuilder.PathParameters)
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/kiota-lock.json
@@ -1,5 +1,5 @@
{
"descriptionHash": "58EC2F160FFD5574242F7A6CA2B7490F71BCCB733BDE83D3C4F45E78BBE173C1F5709707046D57237BB1BB5CAA0BA8DDC233C230D609A2EA76202F3D94F5F1A9",
"descriptionHash": "DA6E75F17989092BF227D8F9183FC5A5F9B42B6C1168C39791EC5B3139F8746ABF842849DA6BA11C182C2EBE67F95FCA9B2A028275F16F6C4453ADFB0EE36A95",
"descriptionLocation": "../../../source-generator/schemas/downloaded.json",
"lockFileVersion": "1.0.0",
"kiotaVersion": "1.12.0",
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/models/check_run.go
Expand Up @@ -39,7 +39,7 @@ type CheckRun struct {
pull_requests []PullRequestMinimalable
// The started_at property
started_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
// The phase of the lifecycle that the check is currently in.
// The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs.
status *CheckRun_status
// The url property
url *string
Expand Down Expand Up @@ -318,7 +318,7 @@ func (m *CheckRun) GetPullRequests()([]PullRequestMinimalable) {
func (m *CheckRun) GetStartedAt()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.started_at
}
// GetStatus gets the status property value. The phase of the lifecycle that the check is currently in.
// GetStatus gets the status property value. The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs.
// returns a *CheckRun_status when successful
func (m *CheckRun) GetStatus()(*CheckRun_status) {
return m.status
Expand Down Expand Up @@ -512,7 +512,7 @@ func (m *CheckRun) SetPullRequests(value []PullRequestMinimalable)() {
func (m *CheckRun) SetStartedAt(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.started_at = value
}
// SetStatus sets the status property value. The phase of the lifecycle that the check is currently in.
// SetStatus sets the status property value. The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs.
func (m *CheckRun) SetStatus(value *CheckRun_status)() {
m.status = value
}
Expand Down
13 changes: 11 additions & 2 deletions pkg/github/models/check_run_status.go
Expand Up @@ -2,17 +2,20 @@ package models
import (
"errors"
)
// The phase of the lifecycle that the check is currently in.
// The phase of the lifecycle that the check is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check runs.
type CheckRun_status int

const (
QUEUED_CHECKRUN_STATUS CheckRun_status = iota
IN_PROGRESS_CHECKRUN_STATUS
COMPLETED_CHECKRUN_STATUS
WAITING_CHECKRUN_STATUS
REQUESTED_CHECKRUN_STATUS
PENDING_CHECKRUN_STATUS
)

func (i CheckRun_status) String() string {
return []string{"queued", "in_progress", "completed"}[i]
return []string{"queued", "in_progress", "completed", "waiting", "requested", "pending"}[i]
}
func ParseCheckRun_status(v string) (any, error) {
result := QUEUED_CHECKRUN_STATUS
Expand All @@ -23,6 +26,12 @@ func ParseCheckRun_status(v string) (any, error) {
result = IN_PROGRESS_CHECKRUN_STATUS
case "completed":
result = COMPLETED_CHECKRUN_STATUS
case "waiting":
result = WAITING_CHECKRUN_STATUS
case "requested":
result = REQUESTED_CHECKRUN_STATUS
case "pending":
result = PENDING_CHECKRUN_STATUS
default:
return 0, errors.New("Unknown CheckRun_status value: " + v)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/github/models/check_suite.go
Expand Up @@ -41,7 +41,7 @@ type CheckSuite struct {
rerequestable *bool
// The runs_rerequestable property
runs_rerequestable *bool
// The status property
// The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
status *CheckSuite_status
// The updated_at property
updated_at *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
Expand Down Expand Up @@ -347,7 +347,7 @@ func (m *CheckSuite) GetRerequestable()(*bool) {
func (m *CheckSuite) GetRunsRerequestable()(*bool) {
return m.runs_rerequestable
}
// GetStatus gets the status property value. The status property
// GetStatus gets the status property value. The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
// returns a *CheckSuite_status when successful
func (m *CheckSuite) GetStatus()(*CheckSuite_status) {
return m.status
Expand Down Expand Up @@ -562,7 +562,7 @@ func (m *CheckSuite) SetRerequestable(value *bool)() {
func (m *CheckSuite) SetRunsRerequestable(value *bool)() {
m.runs_rerequestable = value
}
// SetStatus sets the status property value. The status property
// SetStatus sets the status property value. The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
func (m *CheckSuite) SetStatus(value *CheckSuite_status)() {
m.status = value
}
Expand Down
12 changes: 11 additions & 1 deletion pkg/github/models/check_suite_status.go
Expand Up @@ -2,16 +2,20 @@ package models
import (
"errors"
)
// The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
type CheckSuite_status int

const (
QUEUED_CHECKSUITE_STATUS CheckSuite_status = iota
IN_PROGRESS_CHECKSUITE_STATUS
COMPLETED_CHECKSUITE_STATUS
WAITING_CHECKSUITE_STATUS
REQUESTED_CHECKSUITE_STATUS
PENDING_CHECKSUITE_STATUS
)

func (i CheckSuite_status) String() string {
return []string{"queued", "in_progress", "completed"}[i]
return []string{"queued", "in_progress", "completed", "waiting", "requested", "pending"}[i]
}
func ParseCheckSuite_status(v string) (any, error) {
result := QUEUED_CHECKSUITE_STATUS
Expand All @@ -22,6 +26,12 @@ func ParseCheckSuite_status(v string) (any, error) {
result = IN_PROGRESS_CHECKSUITE_STATUS
case "completed":
result = COMPLETED_CHECKSUITE_STATUS
case "waiting":
result = WAITING_CHECKSUITE_STATUS
case "requested":
result = REQUESTED_CHECKSUITE_STATUS
case "pending":
result = PENDING_CHECKSUITE_STATUS
default:
return 0, errors.New("Unknown CheckSuite_status value: " + v)
}
Expand Down
8 changes: 7 additions & 1 deletion pkg/github/models/job_status.go
Expand Up @@ -10,10 +10,12 @@ const (
IN_PROGRESS_JOB_STATUS
COMPLETED_JOB_STATUS
WAITING_JOB_STATUS
REQUESTED_JOB_STATUS
PENDING_JOB_STATUS
)

func (i Job_status) String() string {
return []string{"queued", "in_progress", "completed", "waiting"}[i]
return []string{"queued", "in_progress", "completed", "waiting", "requested", "pending"}[i]
}
func ParseJob_status(v string) (any, error) {
result := QUEUED_JOB_STATUS
Expand All @@ -26,6 +28,10 @@ func ParseJob_status(v string) (any, error) {
result = COMPLETED_JOB_STATUS
case "waiting":
result = WAITING_JOB_STATUS
case "requested":
result = REQUESTED_JOB_STATUS
case "pending":
result = PENDING_JOB_STATUS
default:
return 0, errors.New("Unknown Job_status value: " + v)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/repos/item_item_actions_runs_request_builder.go
Expand Up @@ -32,7 +32,7 @@ type ItemItemActionsRunsRequestBuilderGetQueryParameters struct {
Page *int32 `uriparametername:"page"`
// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Per_page *int32 `uriparametername:"per_page"`
// Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`.
// Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.
Status *ib50fd1a31f59a50cad835d1bac105bcca1f781f781bbe17e66a476cfdf7485c8.GetStatusQueryParameterType `uriparametername:"status"`
}
// ByRun_id gets an item from the github.com/octokit/go-sdk/pkg/github/.repos.item.item.actions.runs.item collection
Expand Down
Expand Up @@ -31,7 +31,7 @@ type ItemItemActionsWorkflowsItemRunsRequestBuilderGetQueryParameters struct {
Page *int32 `uriparametername:"page"`
// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Per_page *int32 `uriparametername:"per_page"`
// Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`.
// Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub Actions can set a status of `waiting`, `pending`, or `requested`.
Status *ia77747759b3f91e25296248277ed17f00dd8b68db982a03262ffc61b4720274c.GetStatusQueryParameterType `uriparametername:"status"`
}
// NewItemItemActionsWorkflowsItemRunsRequestBuilderInternal instantiates a new ItemItemActionsWorkflowsItemRunsRequestBuilder and sets the default values.
Expand Down