Skip to content

Commit

Permalink
Add tx to formatMarkers
Browse files Browse the repository at this point in the history
[changelog:added]
  • Loading branch information
cdupuis committed Apr 13, 2021
1 parent 857b54b commit 2df7dc6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/github/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Octokit } from "@octokit/rest"; // eslint-disable-line @typescript-esli

import { Contextual } from "../handler/handler";
import { debug, error, info, warn } from "../log/console";
import { isSubscriptionIncoming } from "../payload";
import { AuthenticatedRepositoryId } from "../repository/id";
import { GitHubAppCredential, GitHubCredential } from "../secret/provider";
import { toArray } from "../util";
Expand Down Expand Up @@ -72,6 +73,9 @@ export function formatMarkers(
ctx: Contextual<any, any>,
...tags: string[]
): string {
const tx = isSubscriptionIncoming(ctx.trigger)
? ctx.trigger.subscription.tx
: undefined;
return `
<!--
[atomist:generated]
Expand All @@ -80,7 +84,12 @@ export function formatMarkers(
[atomist-configuration:${toArray(ctx.configuration)
.map(c => c.name)
.join(",")}]
[atomist-workspace-id:${ctx.workspaceId}]
[atomist-workspace-id:${ctx.workspaceId}]${
tx
? `
[atomist-tx:${tx}]`
: ""
}
[atomist-correlation-id:${ctx.correlationId}]${
tags.length > 0 ? "\n" : ""
}${tags.map(t => ` [${t}]`).join("\n")}
Expand Down

0 comments on commit 2df7dc6

Please sign in to comment.