Skip to content

Incomplete type for merge request field detailedMergeStatus #3768

@ralfstx

Description

@ralfstx

Description

  • Node.js version: v22.19.0
  • Gitbeaker version: @gitbeaker/rest": "^43.5.0

The type of the field detailedMergeStatus in ExpandedMergeRequestSchema contains the values "checking" | "blocked_status" | "broken_status" | "unchecked" | "ci_must_pass" | "ci_still_running" | "discussions_not_resolved" | "draft_status" | "external_status_checks" | "mergeable" | "not_approved" | "not_open" | "policies_denied" | "jira_association_missing".

However, at runtime, I've also observed the values need_rebase and preparing.

Steps to reproduce

console.log(mergeRequest.detailedMergeStatus)
  • Shortly after creating a new MR, it prints "preparing.
  • For a MR that needs a rebase, it prints "need_rebase".

Expected behaviour

The TypeScript type of this field should include all possible values.

Ideally, there was some kind of indication when certain values are used. They seem to diverge from the ones described in the GitLab API Docs, which is confusing.

Checklist

  • I have checked that this is not a duplicate issue.
  • I have read the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:typesAdding or enhancing typescript types

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions