Skip to content

Commit

Permalink
Updating libraries and adding additional debug information when active
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-murray authored Oct 11, 2024
1 parent dc04139 commit f9a6e5b
Show file tree
Hide file tree
Showing 9 changed files with 171 additions and 152 deletions.
18 changes: 11 additions & 7 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"name": "Workspace",
"image": "ghcr.io/octodemo/development-containers/javascript:base-202401-r1",
"extensions": [
"dbaeumer.vscode-eslint",
"redhat.vscode-yaml",
"swellaby.node-pack"
],
"postCreateCommand": "npm install"
"image": "ghcr.io/octodemo/development-containers/javascript-nodejs-20:base-202408-r2",
"postCreateCommand": "npm install",
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"redhat.vscode-yaml",
"swellaby.node-pack"
],
}
}
}
8 changes: 4 additions & 4 deletions dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/post/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ run();

function fail(err, message) {
core.error(err);
// Provide a debug controllable stack trace
core.debug(err.stack);

if (message) {
core.setFailed(message);
Expand Down
2 changes: 2 additions & 0 deletions lib/github-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class GitHubApplication {
const token = jwt.sign(payload, this.privateKey, { algorithm: 'RS256' });
this._client = getOctokit(token, this._githubApiUrl, proxy);

core.debug(`Attempting to fetch GitHub Application...`);
return this.client.request('GET /app', {
mediaType: {
previews: ['machine-man']
Expand All @@ -68,6 +69,7 @@ class GitHubApplication {
// Store the metadata for debug purposes
self._metadata = resp.data;

core.debug(` GitHub Application resolved: ${JSON.stringify(resp.data)}`);
return resp.data;
} else {
throw new Error(`Failed to load application with id:${this.id}; ${resp.data}`);
Expand Down
Loading

0 comments on commit f9a6e5b

Please sign in to comment.