Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@lifeomic/bitrise

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifeomic/bitrise - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

6

package.json
{
"name": "@lifeomic/bitrise",
"version": "0.2.0",
"version": "0.3.0",
"description": "Bitrise API client",

@@ -23,3 +23,4 @@ "main": "src/client.js",

"dependencies": {
"axios": "^0.18.0"
"axios": "^0.18.0",
"lodash": "^4.17.10"
},

@@ -31,3 +32,2 @@ "devDependencies": {

"eslint": "^5.0.1",
"lodash": "^4.17.10",
"luxon": "^1.3.1",

@@ -34,0 +34,0 @@ "nyc": "^12.0.2",

@@ -44,2 +44,4 @@ bitrise

- **disableStatusReporting** — disable sending status reports to SCM.
- **environment** — an object of key value pairs representing environment
variables to provide to the build.
- **pullRequest** — the ID of the pull request being built.

@@ -46,0 +48,0 @@ - **target** — the destination branch of the pull request.

@@ -7,4 +7,16 @@ const build = require('./build');

const buildEnvironment = (environment) => {
if (!environment) {
return null;
}
const environments = [];
for (const [ name, value ] of Object.entries(environment)) {
environments.push({ mapped_to: name, value });
}
return environments;
};
const buildParameters = (
{ branch, commitHash, commitMessage, disableStatusReporting, pullRequest, target, workflow }
{ branch, commitHash, commitMessage, disableStatusReporting, environment, pullRequest, target, workflow }
) => pickBy(

@@ -16,2 +28,3 @@ {

commit_message: commitMessage,
environments: buildEnvironment(environment),
pull_request_id: pullRequest,

@@ -18,0 +31,0 @@ skip_git_status_report: disableStatusReporting,

@@ -188,1 +188,31 @@ const app = require('../src/app');

});
test('environment variables can be supplied to a build', async (test) => {
const { app, client, slug } = test.context;
const stub = stubTriggerBuild({ appSlug: slug, axios: client });
const environment = {
VARIABLE_ONE: uuid(),
VARIABLE_TWO: uuid()
};
const build = await app.triggerBuild({ environment });
test.is(build.appSlug, slug);
test.is(build.buildSlug, stub.build.build_slug);
sinon.assert.calledOnce(client.post);
sinon.assert.calledWithExactly(
client.post,
sinon.match.string,
sinon.match({
build_params: {
environments: [
{ mapped_to: 'VARIABLE_ONE', value: environment.VARIABLE_ONE },
{ mapped_to: 'VARIABLE_TWO', value: environment.VARIABLE_TWO }
]
},
hook_info: { type: 'bitrise' },
triggered_by: '@lifeomic/bitrise'
})
);
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc