[Schema Inaccuracy] run-id type format should be `int64`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
対象は OpenAPI の #/components/parameters/run-id 定義です。まずそのスキーマエントリを見つけ、報告書にリンクされている生成ファイル pkg/github/repos/item_item_actions_runs_request_builder.go と比較してください。修正後の形式によって Go SDK で int64 の run ID が生成されることを確認し、その後 curl リクエストと Go の再現を再実行してください。完了条件は、スキーマが int64 を宣言し、生成された呼び出しで int32 が使われなくなることです。
索引モデルが issue の本文から書いたものです。
説明
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() }
- 主要言語
- 言語のデータがありません
- スター
- 1.6k
- フォーク
- 345
- 平均マージ
- 7時間 29分
- マージ済み PR(30日)
- 62
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/rest-api-description のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
github/rest-api-description#7246 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
github/rest-api-description#7220 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
github/rest-api-description#7201 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
github/rest-api-description#7163 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/rest-api-description#7162 ·
メンテナーはふだん 1 日以内に返信
github/rest-api-description の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
web-infra-dev/rsbuild#8608 ·
メンテナーはふだん 1 日以内に返信
-
google_chat: format_message leaks GCn placeholders when inline code is inside bold/header/link textオープンcomp/plugins P3 sweeper:risk-message-delivery type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
NousResearch/hermes-agent#128985 ·
メンテナーはふだん 1 日以内に返信
-
SlackAdapter and TelegramAdapter are not assignable to Adapter under exactOptionalPropertyTypesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
vector-store
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信