Skip to content

Commit 667acc0

Browse files
committed
chore: update README
1 parent aa91902 commit 667acc0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,16 @@ This is the second part of the onboarding tutorial. We will verify a published c
2020

2121
* `PACT_BROKER_TOKEN`: a valid [API token](https://docs.pactflow.io/#configuring-your-api-token) for PactFlow
2222
* `PACT_URL`: a fully qualified domain name with protocol of public tenant `https://test.pactflow.io`
23+
* `GIT_COMMIT`: git SHA which being used as provider version
24+
* `GIT_BRANCH`: git branch which being used as provider branch
25+
26+
Alternatively, you can create a `.env` file at the project root folder and put the variables in. ie:
2327

24-
Alternatively, you can create a `.env` file at the project root folder and put the 2 variables in. ie:
2528
```
2629
PACT_URL=https://test.pactflow.io
2730
PACT_BROKER_TOKEN=<<whatever-the-token-you-found>>
31+
GIT_COMMIT="$(git rev-parse HEAD)"
32+
GIT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
2833
```
2934

3035
Please note it's `PACT_URL`, not `PACT_BROKER_BASE_URL` as specified in [example-consumer](https://github.com/pactflow/example-consumer/tree/workshop/pactflow). Although they are refering to the same thing.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "node server.js",
88
"test": "jest --testTimeout 30000 --testPathIgnorePatterns consumerChange.pact.test.js",
99
"test:pact": "jest --testTimeout 30000 --testMatch \"**/*.consumerChange.pact.test.js\"",
10-
"verify_pacts": "GIT_COMMIT=\"$(git rev-parse HEAD)\" GIT_BRANCH=\"$(git rev-parse --abbrev-ref HEAD)\" npm run test:pact"
10+
"verify_pacts": "npm run test:pact"
1111
},
1212
"dependencies": {
1313
"cors": "^2.8.5",

0 commit comments

Comments
 (0)