Skip to content

Commit

Permalink
Build outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
bigdaz committed Jan 1, 2024
1 parent 0ad47f0 commit dcc2b45
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
11 changes: 4 additions & 7 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140552,16 +140552,14 @@ function addPRComment(content) {
const github_token = params.getGithubToken();
const context = github.context;
if (context.payload.pull_request == null) {
core.info('Not a PR');
core.info(`Issue number: ${context.issue.number}`);
core.info(`Context payload: ${JSON.stringify(context.payload)}`);
core.info(`Context: ${JSON.stringify(context)}`);
core.info('No pull_request trigger: not adding PR comment');
return;
}
const pull_request_number = context.payload.pull_request.number;
core.info(`Adding Job Summary as comment to PR #${pull_request_number}.`);
const prComment = `<h3>Summary for gradle-build-action: ${github.context.workflow} - ${github.context.job}</h3>\n${content}`;
const octokit = github.getOctokit(github_token);
yield octokit.rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: pull_request_number, body: content }));
yield octokit.rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: pull_request_number, body: prComment }));
}
catch (error) {
core.warning(`Failed to generate PR comment: ${String(error)}`);
Expand All @@ -140573,10 +140571,9 @@ function renderSummaryTable(results) {
return 'No Gradle build results detected.';
}
return `
<h3>Gradle Builds</h3>
<table>
<tr>
<th>Root Project</th>
<th>Gradle Root Project</th>
<th>Requested Tasks</th>
<th>Gradle Version</th>
<th>Build Outcome</th>
Expand Down
2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137873,16 +137873,14 @@ function addPRComment(content) {
const github_token = params.getGithubToken();
const context = github.context;
if (context.payload.pull_request == null) {
core.info('Not a PR');
core.info(`Issue number: ${context.issue.number}`);
core.info(`Context payload: ${JSON.stringify(context.payload)}`);
core.info(`Context: ${JSON.stringify(context)}`);
core.info('No pull_request trigger: not adding PR comment');
return;
}
const pull_request_number = context.payload.pull_request.number;
core.info(`Adding Job Summary as comment to PR #${pull_request_number}.`);
const prComment = `<h3>Summary for gradle-build-action: ${github.context.workflow} - ${github.context.job}</h3>\n${content}`;
const octokit = github.getOctokit(github_token);
yield octokit.rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: pull_request_number, body: content }));
yield octokit.rest.issues.createComment(Object.assign(Object.assign({}, context.repo), { issue_number: pull_request_number, body: prComment }));
}
catch (error) {
core.warning(`Failed to generate PR comment: ${String(error)}`);
Expand All @@ -137894,10 +137892,9 @@ function renderSummaryTable(results) {
return 'No Gradle build results detected.';
}
return `
<h3>Gradle Builds</h3>
<table>
<tr>
<th>Root Project</th>
<th>Gradle Root Project</th>
<th>Requested Tasks</th>
<th>Gradle Version</th>
<th>Build Outcome</th>
Expand Down
2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

0 comments on commit dcc2b45

Please sign in to comment.