Skip to content

feature: add strategy job_index field to GitHub scenario - #23

Merged
tixxdz merged 1 commit into
mainfrom
pr/tixxdz/06-strategy-job-index
Jun 25, 2026
Merged

tixxdz merged 1 commit into
mainfrom
pr/tixxdz/06-strategy-job-index

Conversation

@tixxdz

@tixxdz tixxdz commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator
  • Add job index to the GitHub scenario type to uniquely identify a job within a matrix or reusable workflow run.
  • Propagate the new field through clone, zero-check, and both JSON serialization paths.

Copilot AI review requested due to automatic review settings June 24, 2026 20:28
@tixxdz tixxdz self-assigned this Jun 24, 2026
@tixxdz tixxdz added the enhancement New feature or request label Jun 24, 2026
@tixxdz
tixxdz requested a review from nicolasparada June 24, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a job_index field to the GitHub scenario model to uniquely identify jobs within matrix/reusable workflow runs, and ensures it is preserved across cloning, zero checks, and both JSON serialization paths.

Changes:

  • Added JobIndex to ScenarioGitHub with json:"job_index" tagging.
  • Propagated JobIndex through ScenarioGitHub.Clone(), ScenarioGitHub.IsZero(), ScenarioGitHub.MarshalJSON(), and ScenarioGitHub.MarshalJSONMap().
  • Updated the profile round-trip test fixture to include JobIndex to validate JSON marshal/unmarshal coverage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/ongoing/scenarios.go Introduces and wires JobIndex through clone/zero-check and both JSON serialization implementations for ScenarioGitHub.
pkg/ongoing/types_test.go Extends the profile round-trip fixture with JobIndex to exercise serialization/unmarshalling for the new field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/ongoing/scenarios.go Resolved

@nicolasparada nicolasparada left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the data type? numeric

- Add job index to the GitHub scenario type to uniquely identify
  a job within a matrix or reusable workflow run.
- Propagate the new field through clone, zero-check, and both
  JSON serialization paths.
@tixxdz
tixxdz force-pushed the pr/tixxdz/06-strategy-job-index branch from 0eac3ab to 7e8c472 Compare June 24, 2026 23:07
@tixxdz
tixxdz merged commit 2d76d89 into main Jun 25, 2026
1 check passed
@tixxdz
tixxdz deleted the pr/tixxdz/06-strategy-job-index branch June 25, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants