package com.microservices.dms.utils;

import com.microservices.common.httpClient.domain.GitLinkRequestUrl;

public class DmsGitLinkRequestUrl extends GitLinkRequestUrl {

    /**
     * 获取项目贡献者
     */
    public static String CONTRIBUTORS(String fullName) {
        return String.format("/api/%s/contributors.json", fullName);
    }

    /**
     * 获取项目成员//
     */
    public static String QUERY_USER_FROM_PROJECT(String fullName) {
        return String.format("/api/%s/collaborators.json", fullName);
    }

    /**
     * 获取所有的PR
     */
    public static String GET_PULL_REQUEST(String fullName, String statusType) {
       return String.format("/api/%s/pulls.json?status_type=%s", fullName, statusType);
    }

    /**
     * 获取PR的文件
     */
    public static String GET_PR_FILES(String fullName, int PRNum) {
       return String.format("/api/v1/%s/pulls/%s/files.json", fullName, PRNum);
    }
}