All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.societegenerale.cidroid.tasks.consumer.services.model.github.PushEvent Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.societegenerale.cidroid.tasks.consumer.services.model.github;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.societegenerale.cidroid.tasks.consumer.services.model.GitHubEvent;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class PushEvent implements GitHubEvent {

    private String ref;

    private Repository repository;

    @JsonProperty("head_commit")
    private Commit headCommit;

    @Override
    public String getRepositoryUrl() {
        return getRepository().getUrl();
    }

    public boolean happenedOnDefaultBranch(){
        return ref.endsWith(getRepository().getDefaultBranch());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy