Skip to content

Commit 04ac3c9

Browse files
committed
rename job id to job name
1 parent f0e08a2 commit 04ac3c9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ jobs:
1818
CYPRESS_runId: ${{ github.run_id }}
1919
CYPRESS_runNumber: ${{ github.run_number }}
2020
CYPRESS_runAttempt: ${{ github.run_attempt }}
21-
CYPRESS_jobId: ${{ github.job }}
21+
CYPRESS_jobName: ${{ github.job }}

cypress/support/e2e.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ beforeEach(() => {
2222
if (Cypress.env('runAttempt')) {
2323
req.headers['X-Run-Attempt'] = Cypress.env('runAttempt')
2424
}
25-
if (Cypress.env('jobId')) {
26-
req.headers['X-Job-Id'] = Cypress.env('jobId')
25+
if (Cypress.env('jobName')) {
26+
req.headers['X-Job-Name'] = Cypress.env('jobName')
2727
}
2828
})
2929
})

server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ const PORT = process.env.PORT || 4321
44

55
const publicFolder = path.join(__dirname, 'public')
66

7-
const startsWithX = (key) => key.toLowerCase().startsWith('x')
7+
// all request headers are lowercase
8+
const startsWithX = (key) => key.startsWith('x')
89

910
// print all X-... request headers
1011
fastify.addHook('preHandler', (request, reply, done) => {

0 commit comments

Comments
 (0)