Skip to content

Commit fb7c44c

Browse files
committed
fix: update version to 4.1.7-next.12 and extract workflow name in GitHub annotations
1 parent 751f139 commit fb7c44c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

cookbooks/app-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@equinor/fusion-framework-cookbook-app-react",
3-
"version": "4.1.7-next.11",
3+
"version": "4.1.7-next.12",
44
"description": "",
55
"private": true,
66
"type": "module",

packages/cli/src/lib/utils/resolve-github-annotations.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ function extractPayloadAnnotations(payload: GithubEventPayload): Record<string,
117117
head_commit: payload.head_commit?.id, // SHA of the head commit
118118
after: payload.after, // SHA after the event
119119
ref: payload.ref, // Branch or tag ref
120-
workflow: payload.workflow, // Workflow name
121120
release: {}, // Will be populated if this is a release event
122121
pull_request: {}, // Will be populated if this is a pull request event
123122
};
@@ -171,6 +170,7 @@ function extractPayloadAnnotations(payload: GithubEventPayload): Record<string,
171170
* - GITHUB_REPOSITORY: Repository in the format owner/repo
172171
* - GITHUB_SERVER_URL: Base URL of the GitHub server (defaults to https://github.com)
173172
* - GITHUB_EVENT_PATH: Path to the event payload file (JSON)
173+
* - GITHUB_WORKFLOW: Name of the workflow
174174
*
175175
* Notes for maintainers:
176176
* - The event payload can be large; consider truncating or parsing if only specific fields are needed.
@@ -191,6 +191,10 @@ export const resolveGithubAnnotations = (): GithubAnnotations => {
191191
const runId = process.env.GITHUB_RUN_ID || 'unknown';
192192
// Extract repository in the format owner/repo
193193
const repository = process.env.GITHUB_REPOSITORY || 'unknown';
194+
195+
// Extract workflow name
196+
const workflow = process.env.GITHUB_WORKFLOW || 'unknown';
197+
194198
// Extract server URL (defaults to public GitHub if not set)
195199
const serverUrl = process.env.GITHUB_SERVER_URL || 'https://github.com';
196200
// Extract event payload path and read payload if available
@@ -216,6 +220,7 @@ export const resolveGithubAnnotations = (): GithubAnnotations => {
216220
runId,
217221
repository,
218222
runUrl,
223+
workflow,
219224
...extractPayloadAnnotations(payload),
220225
};
221226
// Return the resolved annotation variables

0 commit comments

Comments
 (0)