本文整理匯總了Java中org.eclipse.egit.github.core.MergeStatus類的典型用法代碼示例。如果您正苦於以下問題:Java MergeStatus類的具體用法?Java MergeStatus怎麽用?Java MergeStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MergeStatus類屬於org.eclipse.egit.github.core包,在下文中一共展示了MergeStatus類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: merge
import org.eclipse.egit.github.core.MergeStatus; //導入依賴的package包/類
public MergeStatus merge(int id, String commitMessage)
{
try
{
return pullRequestService.merge(repository, id, commitMessage);
}
catch (IOException e)
{
throw new RuntimeException(e);
}
}
示例2: merge
import org.eclipse.egit.github.core.MergeStatus; //導入依賴的package包/類
/**
* Merge given pull request
*
* @param repository
* @param id
* @param commitMessage
* @return status of merge
* @throws IOException
*/
public MergeStatus merge(IRepositoryIdProvider repository, int id,
String commitMessage) throws IOException {
String repoId = getId(repository);
StringBuilder uri = new StringBuilder(SEGMENT_REPOS);
uri.append('/').append(repoId);
uri.append(SEGMENT_PULLS);
uri.append('/').append(id);
uri.append(SEGMENT_MERGE);
return client.put(uri.toString(),
Collections.singletonMap("commit_message", commitMessage), //$NON-NLS-1$
MergeStatus.class);
}