Skip to content

Commit

Permalink
WIP: DO NOT MERGE
Browse files Browse the repository at this point in the history
This commit includes the changes made in github/dependency-submission-toolkit#32
  • Loading branch information
aibaars committed Oct 25, 2022
1 parent 89b023f commit 81a2bdd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 68 deletions.
Binary file modified cli/maven-dependency-submission-linux-x64
Binary file not shown.
68 changes: 1 addition & 67 deletions dist/index.js
Expand Up @@ -3792,7 +3792,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.submitSnapshot = exports.Snapshot = exports.jobFromContext = void 0;
const core = __importStar(__nccwpck_require2_(2186));
const github = __importStar(__nccwpck_require2_(5438));
const rest_1 = __nccwpck_require2_(5375);
const request_error_1 = __nccwpck_require2_(537);
/**
* jobFromContext creates a job from a @actions/github Context
Expand Down Expand Up @@ -3860,9 +3859,7 @@ function submitSnapshot(snapshot, context = github.context) {
core.notice(snapshot.prettyJSON());
const repo = context.repo;
const githubToken = core.getInput('token') || (yield core.getIDToken());
const octokit = new rest_1.Octokit({
auth: githubToken
});
const octokit = github.getOctokit(githubToken);
try {
const response = yield octokit.request('POST /repos/{owner}/{repo}/dependency-graph/snapshots', {
headers: {
Expand Down Expand Up @@ -7460,44 +7457,6 @@ exports.paginatingEndpoints = paginatingEndpoints;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 8883:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

const VERSION = "1.0.4";

/**
* @param octokit Octokit instance
* @param options Options passed to Octokit constructor
*/

function requestLog(octokit) {
octokit.hook.wrap("request", (request, options) => {
octokit.log.debug("request", options);
const start = Date.now();
const requestOptions = octokit.request.endpoint.parse(options);
const path = requestOptions.url.replace(options.baseUrl, "");
return request(options).then(response => {
octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
return response;
}).catch(error => {
octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`);
throw error;
});
});
}
requestLog.VERSION = VERSION;

exports.requestLog = requestLog;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 3044:
Expand Down Expand Up @@ -8798,31 +8757,6 @@ exports.request = request;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 5375:
/***/ ((__unused_webpack_module, exports, __nccwpck_require2_) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

var core = __nccwpck_require2_(6762);
var pluginRequestLog = __nccwpck_require2_(8883);
var pluginPaginateRest = __nccwpck_require2_(4193);
var pluginRestEndpointMethods = __nccwpck_require2_(3044);

const VERSION = "18.12.0";

const Octokit = core.Octokit.plugin(pluginRequestLog.requestLog, pluginRestEndpointMethods.legacyRestEndpointMethods, pluginPaginateRest.paginateRest).defaults({
userAgent: `octokit-rest.js/${VERSION}`
});

exports.Octokit = Octokit;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 3682:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 81a2bdd

Please sign in to comment.