New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eclipse-che/che-e2e

Package Overview
Dependencies
Maintainers
5
Versions
363
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-che/che-e2e - npm Package Compare versions

Comparing version 7.41.0-dev-0a9cb74 to 7.41.0-dev-fcb04b7

20

dist/utils/VCS/github/GitHubUtil.js

@@ -87,2 +87,22 @@ "use strict";

}
async deletePublicSshKeyByName(authToken, keyName) {
const gitHubApiSshURL = GitHubUtil_1.GITHUB_API_ENTRIPOINT_URL + 'user/keys';
const authHeader = { headers: { 'Authorization': 'token ' + authToken, 'Content-Type': 'application/json' } };
try {
const response = await axios_1.default.get(gitHubApiSshURL, authHeader);
const stringified = JSON.stringify(response.data);
const arrayOfPublicKeys = JSON.parse(stringified);
for (let entry of arrayOfPublicKeys) {
if (entry.title === keyName) {
this.removePublicSshKey(authToken, entry.id);
break;
}
}
}
catch (error) {
console.error('Cannot delete the ' + keyName + ' public key from the GitHub account');
console.error(error);
throw error;
}
}
async removeAllPublicSshKeys(authToken) {

@@ -89,0 +109,0 @@ try {

2

package.json
{
"name": "@eclipse-che/che-e2e",
"version": "7.41.0-dev-0a9cb74",
"version": "7.41.0-dev-fcb04b7",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -76,2 +76,21 @@ import { injectable } from 'inversify';

async deletePublicSshKeyByName(authToken: string, keyName: string) {
const gitHubApiSshURL: string = GitHubUtil.GITHUB_API_ENTRIPOINT_URL + 'user/keys';
const authHeader = { headers: { 'Authorization': 'token ' + authToken, 'Content-Type': 'application/json' } };
try {
const response = await axios.get(gitHubApiSshURL, authHeader);
const stringified = JSON.stringify(response.data);
const arrayOfPublicKeys = JSON.parse(stringified);
for (let entry of arrayOfPublicKeys) {
if (entry.title === keyName) {
this.removePublicSshKey(authToken, entry.id);
break;
}
}
} catch (error) {
console.error('Cannot delete the ' + keyName + ' public key from the GitHub account');
console.error(error);
throw error;
}
}

@@ -78,0 +97,0 @@ async removeAllPublicSshKeys(authToken: string) {

Sorry, the diff of this file is not supported yet

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