feat: add Jobs field to ProjectLintResult

Closes #2340 (closed)

Description

The CI Lint API (POST /projects/:id/ci/lint and GET /projects/:id/ci/lint) returns job definitions when include_jobs=true.

While ProjectNamespaceLintOptions and ProjectLintOptions already support IncludeJobs, ProjectLintResult was missing the jobs field.

This MR:

  • Adds ProjectLintJob struct (name, stage, before_script, script, after_script).
  • Adds Jobs []ProjectLintJob to ProjectLintResult.

API Reference: https://docs.gitlab.com/api/lint/#validate-cicd-configuration

Testing

  • Added test coverage in validate_test.go for TestValidateProjectNamespace and TestValidateProjectLint.
  • go test -race ./... and golangci-lint run . pass.

Merge request reports

Loading
Loading