Skip to content

Commit

Permalink
feat: Add buildUrl option to Pact Broker Publishing API
Browse files Browse the repository at this point in the history
  • Loading branch information
Danil Nurgaliev committed Dec 13, 2021
1 parent 85f0b92 commit 58be64a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ pact.publishPacts(opts).then(function () {
| `pactBrokerPassword` | false | string | Password for Pact Broker basic authentication. Optional |
| `pactBrokerToken` | false | string | Bearer token for Pact Broker authentication. Optional |
| `tags` | false | array | An array of Strings to tag the Pacts being published. Optional |
| `buildUrl` | false | string | The build URL that created the pact. Optional |
| `verbose` | false | boolean | Enables verbose output for underlying pact binary. |

### Pact Broker Deployment Check
Expand Down
2 changes: 2 additions & 0 deletions src/publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class Publisher {
tags: '--tag',
consumerVersion: '--consumer-app-version',
verbose: '--verbose',
buildUrl: '--build-url',
};

constructor(options: PublisherOptions) {
Expand Down Expand Up @@ -148,4 +149,5 @@ export interface PublisherOptions {
tags?: string[];
verbose?: boolean;
timeout?: number;
buildUrl?: string;
}
1 change: 1 addition & 0 deletions test/publisher.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('Publish Spec', () => {
),
],
consumerVersion: '1.0.0',
buildUrl: 'http://ci/build/1',
});

expect(publisher).to.be.a('object');
Expand Down

0 comments on commit 58be64a

Please sign in to comment.