File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ reporter: [
122122 repositoryName: " ctrf-json" , // Optional: Specify the repository name.
123123 repositoryUrl: " https://gh.io" , // Optional: Specify the repository url.
124124 branchName: " main" , // Optional: Specify the branch name.
125+ commit: " abc123" , // Optional: Specify the commit id.
125126 testEnvironment: " staging" // Optional: Specify the test environment (e.g. staging, production).
126127 }]
127128 ],
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ interface ReporterConfigOptions {
3838 repositoryName ?: string | undefined
3939 repositoryUrl ?: string | undefined
4040 branchName ?: string | undefined
41+ commit ?: string | undefined
4142 testEnvironment ?: string | undefined
4243}
4344
@@ -70,6 +71,7 @@ class GenerateCtrfReport implements Reporter {
7071 repositoryName : config ?. repositoryName ?? undefined ,
7172 repositoryUrl : config ?. repositoryUrl ?? undefined ,
7273 branchName : config ?. branchName ?? undefined ,
74+ commit : config ?. commit ?? undefined ,
7375 testEnvironment : config ?. testEnvironment ?? undefined ,
7476 }
7577
@@ -320,6 +322,9 @@ class GenerateCtrfReport implements Reporter {
320322 if ( reporterConfigOptions . branchName !== undefined ) {
321323 this . ctrfEnvironment . branchName = reporterConfigOptions . branchName
322324 }
325+ if ( reporterConfigOptions . commit !== undefined ) {
326+ this . ctrfEnvironment . commit = reporterConfigOptions . commit
327+ }
323328 if ( reporterConfigOptions . testEnvironment !== undefined ) {
324329 this . ctrfEnvironment . testEnvironment =
325330 reporterConfigOptions . testEnvironment
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ export interface CtrfEnvironment {
7676 repositoryName ?: string
7777 repositoryUrl ?: string
7878 branchName ?: string
79+ commit ?: string
7980 testEnvironment ?: string
8081 extra ?: Record < string , any >
8182}
You can’t perform that action at this time.
0 commit comments