[Schema Inaccuracy] run-id type format should be `int64`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
Research direction
The target is the OpenAPI #/components/parameters/run-id definition; start by locating that schema entry and compare it with the generated file pkg/github/repos/item_item_actions_runs_request_builder.go linked in the report. Confirm the corrected format produces an int64 run ID in the Go SDK, then rerun the curl request and Go reproduction; done means the schema declares int64 and the generated call no longer uses int32.
Written by the indexing model from the issue text.
Description
Schema Inaccuracy
#/components/parameters/run-id type format should be int64, currently the there is no format provided due to which go-sdk which is generated from openapi spec use wrong type for run_id int32
Expected
format should be int64
Reproduction Steps
- set
GITHUB_TOKEN,GITHUB_REPOSITORYandGITHUB_RUN_ID(provide a valid run id) - run
curl -s -H "Authorization: Bearer ${GITHUB_TOKEN}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/jobs"it will work - run the go script below (it will give 404 error, because int64 run_id is converted to int32:
package main import ( "context" "encoding/json" "fmt" "os" "strconv" "strings" "github.com/octokit/go-sdk/pkg" ) func main() { githubToken := os.Getenv("GITHUB_TOKEN") githubRepo := os.Getenv("GITHUB_REPOSITORY") // format: owner/repo githubRunID := os.Getenv("GITHUB_RUN_ID") if githubToken == "" || githubRepo == "" || githubRunID == "" { fmt.Fprintln(os.Stderr, "Missing required environment variables. Please set GITHUB_TOKEN, GITHUB_REPOSITORY, and GITHUB_RUN_ID.") os.Exit(1) } // Parse owner and repo from GITHUB_REPOSITORY parts := strings.Split(githubRepo, "/") if len(parts) != 2 { fmt.Fprintf(os.Stderr, "Invalid GITHUB_REPOSITORY format. Expected 'owner/repo', got: %s\n", githubRepo) os.Exit(1) } owner := parts[0] repo := parts[1] // Convert run ID to int32 for the API runID, err := strconv.ParseInt(githubRunID, 10, 64) if err != nil { fmt.Fprintf(os.Stderr, "Invalid GITHUB_RUN_ID: %v\n", err) os.Exit(1) } // Create GitHub client githubClient, err := pkg.NewApiClient(pkg.WithTokenAuthentication(githubToken)) if err != nil { fmt.Fprintf(os.Stderr, "Failed to create GitHub client: %v\n", err) os.Exit(1) } ctx := context.Background() // Get jobs for the workflow run jobsResponse, err := githubClient.Repos(). ByOwnerId(owner). ByRepoId(repo). Actions(). Runs(). ByRun_id(int32(runID)). Jobs(). Get(ctx, nil) if err != nil { fmt.Fprintf(os.Stderr, "Failed to get workflow jobs: %v\n", err) os.Exit(1) } // Print JSON data fmt.Println("=== Jobs Data (JSON) ===") jsonData, err := json.MarshalIndent(jobsResponse, "", " ") if err != nil { fmt.Fprintf(os.Stderr, "Failed to marshal JSON: %v\n", err) os.Exit(1) } fmt.Println(string(jsonData)) fmt.Println() }
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
syfoud/Simulated_Scepter#172 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crossplane/crossplane#7859 ·
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·