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

@aircall/ci-scripts

Package Overview
Dependencies
Maintainers
7
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aircall/ci-scripts - npm Package Compare versions

Comparing version 2.5.3 to 2.6.3

14

commands/notify-slack.js
const { post } = require('../request.js');
const { checkEnvVariables } = require('../helpers.js');
const {
getMergedPullRequests,
getPullRequest,
getReleaseFromSha1,

@@ -123,3 +123,3 @@ getPreviousReleaseFromRelease,

} else {
mergedPR = await getPRData(CIRCLE_SHA1);
mergedPR = await getPullRequest(CIRCLE_SHA1);
lastDraft = await getLatestDraft();

@@ -148,12 +148,2 @@

const getPRData = async commitish => {
const prs = await getMergedPullRequests();
const mergedPR = prs.find(pr => {
return pr.mergeCommit.oid === commitish;
});
return mergedPR;
};
const notifySlack = async (environment, channel, title = ':ship:') => {

@@ -160,0 +150,0 @@ const isRollback = title === 'rollback';

54

github.js

@@ -173,21 +173,27 @@ const { get, patch, post } = require('./request.js');

const getMergedPullRequests = async () => {
const prFragment = `
nodes {
title
number
mergedAt
url
baseRefName
author {
login
avatarUrl
}
mergeCommit {
oid
committedDate
}
}
`
const getPullRequest = async commitish => {
const repository = `owner: "${CIRCLE_PROJECT_USERNAME}", name: "${CIRCLE_PROJECT_REPONAME}"`;
const query = `{repository(${repository}) {
pullRequests(states: MERGED, last: 100, baseRefName: "master") {
edges {
node {
title
number
mergedAt
url
baseRefName
author {
login
avatarUrl
}
mergeCommit {
oid
committedDate
}
object(oid: "${commitish}") {
... on Commit {
associatedPullRequests(first: 1) {
${prFragment}
}

@@ -197,2 +203,15 @@ }

}
}`
const pullRequestData = await executeGraphQLRequest(query);
return pullRequestData.data.repository.object.associatedPullRequests.nodes[0]
}
const getMergedPullRequests = async () => {
const repository = `owner: "${CIRCLE_PROJECT_USERNAME}", name: "${CIRCLE_PROJECT_REPONAME}"`;
const query = `{repository(${repository}) {
pullRequests(states: MERGED, last: 100, baseRefName: "master") {
${prFragment}
}
}
}`;

@@ -219,4 +238,5 @@

getReleaseFromSha1,
getPullRequest,
getPreviousReleaseFromRelease,
getPreviousReleaseFromSha1
};
{
"name": "@aircall/ci-scripts",
"version": "2.5.3",
"version": "2.6.3",
"dependencies": {},

@@ -5,0 +5,0 @@ "main": "ci-scripts.js",

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