-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bitbucket]: Pull Requests: Support Bitbucket Server (#2598)
* New Service: Bitbucket Server: Pull Request Count * [Bitbucket]: Pull Requests: Add Support for bitbucket-server * Update examples to use namedParams instead of exampleUrl * Simplify cloud vs server check * [Bitbucket]: Add support for bitbucket cloud private repos * Add additional tests for bitbucket server * [Bitbucket]: Add tests for basic auth * [Bitbucket] Format secrets according to style guides * [Bitbucket] Add link to server REST documentation * Punt adding VSCode debug task to separate PR * [Bitbucket] Remove extra truthy check on serverSecrets * [Bitbucket] Fix credentials after rename * [Bitbucket] Use query parameters for Bitbucket Server support * Fix bitbucket creds in secret template * [Bitbucket] staticExample -> staticPreview * Remove VSCode specific gitignore entries * [Bitbucket] Normalize pluralization of PullReqeust(s) to match file name
- Loading branch information
1 parent
fb8c7e9
commit fc4ed93
Showing
4 changed files
with
228 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules/ | |
shields.env | ||
.git/ | ||
.gitignore | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use strict' | ||
|
||
const sinon = require('sinon') | ||
const serverSecrets = require('../../lib/server-secrets') | ||
|
||
const user = 'admin' | ||
const pass = 'password' | ||
|
||
function mockBitbucketCreds() { | ||
serverSecrets['bitbucket_username'] = undefined | ||
serverSecrets['bitbucket_password'] = undefined | ||
sinon.stub(serverSecrets, 'bitbucket_username').value(user) | ||
sinon.stub(serverSecrets, 'bitbucket_password').value(pass) | ||
} | ||
|
||
function mockBitbucketServerCreds() { | ||
serverSecrets['bitbucket_server_username'] = undefined | ||
serverSecrets['bitbucket_server_password'] = undefined | ||
sinon.stub(serverSecrets, 'bitbucket_server_username').value(user) | ||
sinon.stub(serverSecrets, 'bitbucket_server_password').value(pass) | ||
} | ||
|
||
function restore() { | ||
sinon.restore() | ||
} | ||
|
||
module.exports = { | ||
user, | ||
pass, | ||
mockBitbucketCreds, | ||
mockBitbucketServerCreds, | ||
restore, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters