Skip to content

How can I get the real account information of the committer from the '/projects/:id/repository/commits' API? #1106

Open
@YongMingMao

Description

@YongMingMao

POM:

 <dependency>
            <groupId>org.gitlab4j</groupId>
            <artifactId>gitlab4j-api</artifactId>
            <version>5.5.0</version>
</dependency>

API:
GET /projects/:id/repository/commits
my Code :

 List<Commit> commits = gitLabApi.getCommitsApi().getCommits(p.getId(), b.getName(),BEGIN_DATE,END_DATE);

as you can see from the screenshot:
image

the field 'author' is null ,and the values of the authorEmail and authorName come from the user's local settings, rather than the actual user email and username on GitLab
image

thanks ~

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions