How to use the @atomist/slack-messages/SlackMessages.url function in @atomist/slack-messages

To help you get started, we’ve selected a few @atomist/slack-messages examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atomist / sdm / src / handlers / commands / reportRunning.ts View on Github external
function linkToSha(id: RemoteRepoRef, sha: string) {
    return slack.url(id.url + "/tree/" + sha, sha.substr(0, 6));
}
github atomist / sdm / src / handlers / events / delivery / verify / OnEndpointStatus.ts View on Github external
function linkToSha(id: RemoteRepoRef) {
    return slack.url(id.url + "/tree/" + id.sha,
        `${id.owner}/${id.repo}#${id.sha.substr(0, 6)}`);
}
github atomist / sdm / src / handlers / events / delivery / build / SetStatusOnBuildComplete.ts View on Github external
function linkToSha(id: RemoteRepoRef) {
    return slack.url(id.url + "/tree/" + id.sha, id.sha.substr(0, 6));
}
github atomist / sdm / src / util / slack / diffRendering.ts View on Github external
export function linkToDiff(id: RemoteRepoRef, start: string, end: string, endDescription?: string) {
    return slack.url(diffUrl(id, start, end), `(Compare with ${endDescription || end.substr(0, 6)})`);
}
github atomist / sdm / src / software-delivery-machine / blueprint / deploy / presentPromotionInformation.ts View on Github external
export async function presentPromotionInformation(inv: VerifiedDeploymentInvocation) {
    const shaLink = slack.url(inv.id.url + "/tree/" + inv.id.sha, inv.id.repo);
    const endpointLink = slack.url(inv.status.targetUrl);
    const messageId = `httpService:promote:prod/${inv.id.repo}/${inv.id.owner}/${inv.id.sha}`;
    const currentlyRunning = await runningAttachment(inv.context,
        (inv.credentials as TokenCredentials).token,
        inv.id as GitHubRepoRef,
        {domain: K8sProductionDomain, color: ProductionMauve}, inv.id.sha);

    const message: slack.SlackMessage = {
        attachments: currentlyRunning,
    };
    return inv.context.messageClient.send(message, inv.messageDestination, {id: messageId});
}
github atomist / sdm / src / software-delivery-machine / blueprint / deploy / presentPromotionInformation.ts View on Github external
export async function presentPromotionInformation(inv: VerifiedDeploymentInvocation) {
    const shaLink = slack.url(inv.id.url + "/tree/" + inv.id.sha, inv.id.repo);
    const endpointLink = slack.url(inv.status.targetUrl);
    const messageId = `httpService:promote:prod/${inv.id.repo}/${inv.id.owner}/${inv.id.sha}`;
    const currentlyRunning = await runningAttachment(inv.context,
        (inv.credentials as TokenCredentials).token,
        inv.id as GitHubRepoRef,
        {domain: K8sProductionDomain, color: ProductionMauve}, inv.id.sha);

    const message: slack.SlackMessage = {
        attachments: currentlyRunning,
    };
    return inv.context.messageClient.send(message, inv.messageDestination, {id: messageId});
}