aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2022-11-30 12:45:27 -0800
committerJake Potrebic <[email protected]>2022-11-30 12:45:27 -0800
commit7caeec36fc0d32f27f1747c024c28db32c3a678a (patch)
tree7645483b18bf7f7c88384086c4b8d63a8db14b7c /.github
parent5756691b5ab5cc89917e18038963fc48c673b67b (diff)
downloadPaper-7caeec36fc0d32f27f1747c024c28db32c3a678a.tar.gz
Paper-7caeec36fc0d32f27f1747c024c28db32c3a678a.zip
[ci skip] couple more fixes for build pr jar label (#8599)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml7
-rw-r--r--.github/workflows/pr_comment.yml18
2 files changed, 10 insertions, 15 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0102ab94e9..20ca9be6b2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -53,16 +53,16 @@ jobs:
if (pull) {
result["pr"] = pull.number;
result["action"] = "paperclip";
- core.info(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`);
+ core.notice(`This is a push action but to a branch with an open PR with the build paperclip label (${JSON.stringify(result)})`);
return result;
}
} else if (event_name === "pull_request" && event.pull_request.labels.find((l) => l.name === "build-pr-jar")) {
result["pr"] = event.pull_request.number;
result["action"] = "paperclip";
- core.info(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
+ core.notice(`This is a pull request action with a build paperclip label (${JSON.stringify(result)})`);
return result;
}
- core.info("This will not build a paperclip jar");
+ core.notice("This will not build a paperclip jar");
return result;
- name: Apply Patches
@@ -72,7 +72,6 @@ jobs:
./gradlew applyPatches --stacktrace
- name: Build
- if: fromJSON(steps.determine.outputs.result).action == 'build'
run: ./gradlew build --stacktrace
- name: Create Paperclip Jar
diff --git a/.github/workflows/pr_comment.yml b/.github/workflows/pr_comment.yml
index fd73250ab3..2e3c6d5a55 100644
--- a/.github/workflows/pr_comment.yml
+++ b/.github/workflows/pr_comment.yml
@@ -26,16 +26,12 @@ jobs:
async function updatePR(owner, repo, issue_number, purpose, body) {
const { data } = await github.rest.issues.get({ owner, repo, issue_number });
core.debug(JSON.stringify(data, null, 2));
-
+
const marker = `<!-- bot: ${purpose} -->`;
-
- let new_body = data.body ? data.body.trim().split(marker)[0] : "";
- if (!new_body.trim()) {
- new_body += `${marker}\n${body}`
- } else {
- new_body += `${marker}\n---\n${body}`
- }
-
+
+ let new_body = data.body ? data.body.trim().split(marker)[0].trim() : "";
+ new_body += `\n${marker}\n---\n${body}`;
+
core.info(`Updating the text body of PR #${issue_number} in ${owner}/${repo}`);
await github.rest.issues.update({ owner, repo, issue_number, body: new_body });
}
@@ -43,7 +39,7 @@ jobs:
const { owner, repo } = context.repo;
const run_id = ${{ github.event.workflow_run.id }};
const repo_id = ${{ github.event.repository.id }};
-
+
let pulls = [];
const event_type = "${{ github.event.workflow_run.event}}";
if (event_type === "push") { // if push, it's from the same repo which means `pull_requests` is populated
@@ -73,7 +69,7 @@ jobs:
if (!artifact) {
return core.info("Skipping comment to no matching artifact found");
}
-
+
const link = `https://nightly.link/${owner}/${repo}/actions/artifacts/${artifact.id}.zip`;
const body = `Download the paperclip jar for this pull request: [${artifact.name}.zip](${link})`;
core.info(`Adding a link to ${link}`);