Skip to content

Footers are lost when using --from-context #921

Description

@weichweich

Is there an existing issue for this?

  • I have searched the existing issues

Description of the bug

Commit footers are lost when using git-cliff --from-context. It looks like they are not loaded when deserializing a commit.

Steps To Reproduce

Use the following context as input for the command git-cliff --from-context example.json --context and compare the input with the output.

example.json
[
    {
        "version": "0.22.0",
        "message": null,
        "commits": [
            {
                "id": "8505409899f154eb651ca8d3415a998b899df57b",
                "message": "commit message",
                "body": null,
                "footers": [
                    {
                        "token": "Closes",
                        "separator": " #",
                        "value": "889",
                        "breaking": false
                    }
                ],
                "group": "Bug fixes",
                "breaking_description": null,
                "breaking": false,
                "scope": "docs",
                "links": [],
                "author": {
                    "name": "Person A",
                    "email": "person.a@example.com",
                    "timestamp": 1728918198
                },
                "committer": {
                    "name": "Person A",
                    "email": "person.a@example.com",
                    "timestamp": 1728918198
                },
                "conventional": true,
                "merge_commit": false,
                "extra": null,
                "github": {
                    "username": null,
                    "pr_title": null,
                    "pr_number": null,
                    "pr_labels": [],
                    "is_first_time": false
                },
                "gitlab": {
                    "username": "Person A",
                    "pr_title": null,
                    "pr_number": null,
                    "pr_labels": [],
                    "is_first_time": false
                },
                "gitea": {
                    "username": null,
                    "pr_title": null,
                    "pr_number": null,
                    "pr_labels": [],
                    "is_first_time": false
                },
                "bitbucket": {
                    "username": null,
                    "pr_title": null,
                    "pr_number": null,
                    "pr_labels": [],
                    "is_first_time": false
                },
                "remote": {
                    "username": "Person A",
                    "pr_title": null,
                    "pr_number": null,
                    "pr_labels": [],
                    "is_first_time": false
                }
            }
        ],
        "commit_id": "85f392bd2c0e323835166a751eb12900a1ef8de6",
        "timestamp": 1729149570,
        "previous": {
            "version": "v0.21.0",
            "message": null,
            "commits": [],
            "commit_id": "c75bb36c88669b83d734fb5107e2d606a13f3a36",
            "timestamp": 1728550181,
            "previous": null,
            "repository": null,
            "extra": null,
            "github": {
                "contributors": []
            },
            "gitlab": {
                "contributors": []
            },
            "gitea": {
                "contributors": []
            },
            "bitbucket": {
                "contributors": []
            }
        },
        "repository": "...",
        "extra": null,
        "github": {
            "contributors": []
        },
        "gitlab": {
            "contributors": []
        },
        "gitea": {
            "contributors": []
        },
        "bitbucket": {
            "contributors": []
        }
    }
]

Expected behavior

Deserialize the footer from the context.

Screenshots / Logs

No response

Software information

  • Project version: 2.6.1

Additional context

No response

Activity

  1. orhun commented on Oct 17, 2024

    @orhun
    Owner

    duplicate #837
    fixed in #920
    going to be available with the next release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions