Skip to content

Error from missing default_branch from GitLab #1273

@barskern

Description

@barskern

pub default_branch: String,

I'm getting errors that the default_branch is missing from the returned data from GitLab. Odd, but perhaps then git-cliff should take this into account. My token has the scopes read_api and read_repository, which I would think should be enough. I propose changing the required field to an Option<String> and when it will be used it can be unwrapped to some default value.

https://docs.gitlab.com/api/projects/#get-a-single-project

 ERROR git_cliff_core::changelog > Failed to lookup project! Cannot de/serialize JSON: `missing field `default_branch` at line 1 column 4240`

thread 'main' panicked at git-cliff-core/src/changelog.rs:477:18:
Could not get gitlab metadata: JsonError(Error("missing field `default_branch`", line: 1, column: 4240))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions