Skip to content

Commit 9b741a3

Browse files
Improve PR comments (#8888)
* Improve PR comments * Update .github/workflows/open-v3-maintenance-prs.yml Co-authored-by: Dario Piotrowicz <[email protected]> --------- Co-authored-by: Dario Piotrowicz <[email protected]>
1 parent c912b99 commit 9b741a3

File tree

6 files changed

+19
-147
lines changed

6 files changed

+19
-147
lines changed

.github/extract-runtime-versions.mjs

Lines changed: 0 additions & 86 deletions
This file was deleted.

.github/prereleases/3-comment.mjs

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,10 @@ function buildWranglerArtifactReport(pkg) {
2020
assert.strictEqual(name, "wrangler");
2121
const url = getPrereleaseArtifactUrl(name);
2222
const prUrl = getPrereleasePRArtifactUrl(name);
23-
return `A wrangler prerelease is available for testing. You can install this latest build in your project with:
23+
return `A Wrangler prerelease is available for testing. You can install this latest build in your project with:
2424
2525
\`\`\`sh
2626
npm install --save-dev ${url}
27-
\`\`\`
28-
29-
You can reference the automatically updated head of this PR with:
30-
31-
\`\`\`sh
32-
npm install --save-dev ${prUrl}
33-
\`\`\`
34-
35-
Or you can use \`npx\` with this latest build directly:
36-
37-
\`\`\`sh
38-
npx ${url} dev path/to/script.js
3927
\`\`\``;
4028
}
4129

@@ -61,7 +49,7 @@ function buildAdditionalArtifactReport(pkg) {
6149
}
6250

6351
return `
64-
${name}:
52+
\`${name}\`:
6553
\`\`\`sh
6654
${command}
6755
\`\`\`
@@ -84,7 +72,7 @@ function buildReport(pkgs) {
8472

8573
return `${wranglerReport}
8674
87-
<details><summary>Additional artifacts:</summary>
75+
<details><summary>Prereleases for other packages:</summary>
8876
8977
${additionalReports.join("\n\n")}
9078

.github/workflows/create-pullrequest-prerelease.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ jobs:
3333
env:
3434
CI_OS: ${{ runner.os }}
3535

36-
- name: Extract runtime versions
37-
run: node .github/extract-runtime-versions.mjs # extract versions before modifying version to include commit hash
38-
39-
- name: Upload runtime versions
40-
uses: actions/upload-artifact@v4
41-
with:
42-
name: runtime-versions.md
43-
path: runtime-versions.md
44-
4536
- name: Expose ACTIONS_RUNTIME_TOKEN and ACTIONS_RESULTS_URL
4637
# We use the `@actions/artifact` package in the prerelease scripts below.
4738
# This is meant to be used from custom JavaScript actions, rather than

.github/workflows/open-v3-maintenance-prs.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@ jobs:
3636
PR_NUMBER: ${{ github.event.number }}
3737
PR_TITLE: ${{ toJson(github.event.pull_request.title) }}
3838
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
39-
# - name: "Comment on PR with error details"
40-
# if: failure()
41-
# uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb
42-
# with:
43-
# message: |
44-
# Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the `v3-maintenance` branch with your changes. Thank you for helping us keep Wrangler v3 supported!
39+
- name: "Comment on PR with error details"
40+
if: failure()
41+
uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb
42+
with:
43+
header: v3-backport
44+
message: |
45+
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the `v3-maintenance` branch with your changes. Thank you for helping us keep Wrangler v3 supported!
4546
46-
# Depending on your changes, running `git rebase --onto v3-maintenance main ${{ github.head_ref }}` might be a good starting point.
47+
Depending on your changes, running `git rebase --onto v3-maintenance main ${{ github.head_ref }}` might be a good starting point.
4748
48-
# - name: "Comment on PR with error details"
49-
# if: success()
50-
# uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb
51-
# with:
52-
# message: |
53-
# These changes have been automatically backported to Wrangler v3 :tada: You can view the automatically updated PR at https://github.com/cloudflare/workers-sdk/compare/v3-maintenance...v3-maintenance-${{ github.event.number }}. Please check that PR for correctness, and make sure it's merged after this one. Thank you for helping us keep Wrangler v3 supported!
49+
- name: "Comment on PR with backport PR details"
50+
if: success()
51+
uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb
52+
with:
53+
header: v3-backport
54+
message: |
55+
These changes have been automatically backported to Wrangler v3 :tada: You can view the automatically updated PR at https://github.com/cloudflare/workers-sdk/compare/v3-maintenance...v3-maintenance-${{ github.event.number }}. Please check that PR for correctness, and make sure it's merged after this one. Thank you for helping us keep Wrangler v3 supported!

.github/workflows/write-prerelease-comment.yml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,6 @@ jobs:
3636
}
3737
}
3838
39-
- name: "Download runtime versions"
40-
# Regular `actions/download-artifact` doesn't support downloading
41-
# artifacts from another workflow
42-
uses: dawidd6/action-download-artifact@v6
43-
with:
44-
run_id: ${{ github.event.workflow_run.id }}
45-
name: runtime-versions.md
46-
47-
- name: "Put runtime versions on the environment"
48-
id: runtime_versions
49-
run: |
50-
{
51-
echo 'RUNTIME_VERSIONS<<EOF'
52-
cat runtime-versions.md
53-
echo EOF
54-
} >> "$GITHUB_ENV"
55-
5639
- name: "Download pre-release report"
5740
uses: dawidd6/action-download-artifact@v6
5841
with:
@@ -71,10 +54,7 @@ jobs:
7154
- name: "Comment on PR with Wrangler link"
7255
uses: marocchino/sticky-pull-request-comment@v2
7356
with:
57+
header: prerelease
7458
number: ${{ env.WORKFLOW_RUN_PR_FOR_WRANGLER }}
7559
message: |
7660
${{ env.PRERELEASE_REPORT }}
77-
78-
---
79-
80-
${{ env.RUNTIME_VERSIONS }}

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,6 @@ dist/**
228228
.next/**
229229
.turbo
230230

231-
# Runtime dependencies report
232-
runtime-versions.md
233-
234231
/worker-rust/target/
235232

236233
.e2e-test-report/

0 commit comments

Comments
 (0)