Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ your Ultralight instance, for best-in-class traceability.
# See https://github.com/ultralightlabs/test-project/blob/main/.github/workflows/report-commit
# for full examples conditioned on event trigger.
pr-url:

# Can be supplied optionally if your trigger is not a `pull_request` event.
# Whether the supplied commit is a `merge` commit, queried from your github action context. Query method varies depending on your
# workflow's event trigger.
# Updating an approved Software Part Version with a merge commit will NOT withdraw approval for that Software Part Version.
# See https://github.com/ultralightlabs/test-project/blob/main/.github/workflows/report-commit
# for full examples conditioned on event trigger.
is-merge-commit:
```

#### Test Protocol Definitions
Expand Down
12 changes: 9 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"ultralight-core": "0.4.0"
"ultralight-core": "0.5.0"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand Down
9 changes: 5 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ export async function run(): Promise<void> {
core.getInput('commit-hash') || pullRequestEventPayload?.head?.sha
const prUrl = core.getInput('pr-url') || pullRequestEventPayload?.html_url

const isMergeCommit =
core.getInput('is-merge-commit').toLowerCase() === 'true' ||
pullRequestEventPayload.merged === true

if (command === 'REPORT_TEST') {
if (!ultralightProductId)
throw new Error(
Expand All @@ -50,6 +54,7 @@ export async function run(): Promise<void> {
commitUrl: getGithubCommitUrl(),
commitHash,
pullRequestUrl: prUrl,
isMergeCommit,
testExecutionReportPath,
unitUnderTest,
testProtocolDefinitionsDirPath,
Expand All @@ -74,10 +79,6 @@ export async function run(): Promise<void> {
)
}

const isMergeCommit =
core.getInput('is-merge-commit').toLowerCase() === 'true' ||
pullRequestEventPayload.merged === true

result = await reportCommit({
ultralightUrl,
ultralightApiKey,
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6518,7 +6518,7 @@ __metadata:
prettier-eslint: ^16.3.0
ts-jest: ^29.1.2
typescript: ^5.4.5
ultralight-core: 0.4.0
ultralight-core: 0.5.0
languageName: unknown
linkType: soft

Expand All @@ -6542,9 +6542,9 @@ __metadata:
languageName: node
linkType: hard

"ultralight-core@npm:0.4.0":
version: 0.4.0
resolution: "ultralight-core@npm:0.4.0"
"ultralight-core@npm:0.5.0":
version: 0.5.0
resolution: "ultralight-core@npm:0.5.0"
dependencies:
"@oclif/core": ^4.0.18
"@types/archiver": ^6.0.2
Expand All @@ -6555,7 +6555,7 @@ __metadata:
zod: ^3.24.2
bin:
ultralight-core: bin/run.js
checksum: dd81d30587aa6f4b01a7ce684f8e934de1e217ec00e44e67fa4b8ea5c626f5eb65676b47a673cb4caf30701f1a04078d577541e95e25e019c710915d450ab141
checksum: b4c59302ee2fe039fadeaa6cd96716afc61a278678911958f3aea5917a9fdd35d8e5b091f03ac60988624f232d1c83350d3fa1b0d56298d4c6245c484cda35d8
languageName: node
linkType: hard

Expand Down