package com.atlassian.bitbucket.internal.webhook.json;

import com.atlassian.bitbucket.event.repository.RepositoryEvent;
import com.atlassian.bitbucket.rest.repository.RestRepository;
import com.atlassian.bitbucket.util.DateFormatter;
import com.atlassian.bitbucket.webhook.WebHookEventId;

public abstract class AbstractJsonRepositoryWebHook extends AbstractJsonWebHook {

    private static final String KEY_REPOSITORY = "repository";

    public AbstractJsonRepositoryWebHook(RepositoryEvent event, WebHookEventId webHookEventId, DateFormatter dateFormatter) {
        super(event, webHookEventId, dateFormatter);

        put(KEY_REPOSITORY, new RestRepository(event.getRepository()));
    }
}
