public TfsScmCommit GetCommitWithChanges(string commitUrl) { var urlWithChanges = commitUrl; //https://www.visualstudio.com/en-us/docs/integrate/api/git/commits#with-changed-items if (!commitUrl.Contains("changeCount")) { var joiner = commitUrl.Contains("?") ? "&" : "?"; urlWithChanges = $"{commitUrl}{joiner}changeCount=100"; } var commit = _tfsRestConnector.SendGet <TfsScmCommit>(urlWithChanges); return(commit); }
public bool SubscriptionExists(string collectionName, string projectId) { var uriSuffix = ($"{collectionName}/_apis/hooks/subscriptions/?api-version=1.0"); var res = _tfsConnector.SendGet <SubscriptionsListResponse>(uriSuffix); var str = JsonHelper.SerializeObject(res.Value); return(str.Contains(projectId)); //TODO:check if this is bullet proof }