This repository has been archived by the owner on Mar 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split repo automatically into org and project, close #7
- Loading branch information
Showing
3 changed files
with
43 additions
and
3 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
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 |
---|---|---|
|
@@ -8,7 +8,8 @@ | |
"test": "NODE_ENV=test mocha", | ||
"watch": "NODE_ENV=test mocha --watch", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";" | ||
"size": "t=\"$(npm pack .)\"; wc -c \"${t}\"; tar tvf \"${t}\"; rm \"${t}\";", | ||
"issues": "git-issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -19,7 +20,9 @@ | |
"releasing", | ||
"versioning" | ||
], | ||
"files": ["lib"], | ||
"files": [ | ||
"lib" | ||
], | ||
"author": "Loren Norman <[email protected]>", | ||
"license": "MIT", | ||
"bugs": { | ||
|
@@ -34,12 +37,14 @@ | |
"debug": "^3.1.0", | ||
"lazy-ass": "^1.6.0", | ||
"lodash": "^4.17.4", | ||
"parse-github-repo-url": "^1.4.1", | ||
"ramda": "^0.24.1" | ||
}, | ||
"devDependencies": { | ||
"@cypress/releaser": "0.1.12", | ||
"chai": "^3.5.0", | ||
"condition-circle": "^1.5.0", | ||
"git-issues": "^1.3.1", | ||
"github-post-release": "^1.13.1", | ||
"mocha": "^3.2.0", | ||
"nock": "^9.0.24", | ||
|
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,22 @@ | ||
buildkiteProvider = require("../lib/providers/buildkite") | ||
buildkiteApi = require("../lib/providers/buildkite-api") | ||
|
||
describe "Buildkite Provider", -> | ||
beforeEach -> | ||
@api = { | ||
updateEnvironmentVariables: @sandbox.stub().resolves(true) | ||
} | ||
@sandbox.stub(buildkiteApi, 'create').returns(@api) | ||
|
||
@provider = buildkiteProvider.configure({ | ||
buildkiteToken: 'abc123' | ||
}) | ||
|
||
it "passes the buildkite token to api creation", -> | ||
expect(buildkiteApi.create).to.be.calledWith("abc123") | ||
|
||
it "splits repo URL into organization and project", -> | ||
vars = { life: 42 } | ||
@provider.updateProjectEnv("foo/bar", vars) | ||
.then => | ||
expect(@api.updateEnvironmentVariables).to.be.calledWith("foo", "bar", vars) |