From 29ed17bbbfb322f1c8fbd9e90fc2aae47600aff9 Mon Sep 17 00:00:00 2001 From: AnneCYH Date: Tue, 11 Mar 2025 14:48:43 +0800 Subject: [PATCH 1/6] docs: add GHA with comment to docs build Signed-off-by: AnneCYH --- .github/add-docs-link.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/add-docs-link.yaml diff --git a/.github/add-docs-link.yaml b/.github/add-docs-link.yaml new file mode 100644 index 0000000..4a51a70 --- /dev/null +++ b/.github/add-docs-link.yaml @@ -0,0 +1,25 @@ +name: Add PR comment + +on: + pull_request: + types: + - opened + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Add PR comment with doc link + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const prNumber = context.payload.pull_request.number; + const commentBody = `Link to docs build: https://canonical-kteam-docs--${prNumber}.com.readthedocs.build/en/${prNumber}/`; + + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + body: commentBody + }); From 88e47330c77aa36bcc2a3bad3ff968f053819bdc Mon Sep 17 00:00:00 2001 From: AnneCYH Date: Tue, 11 Mar 2025 14:51:52 +0800 Subject: [PATCH 2/6] Create add-docs-link-comment.yml Signed-off-by: AnneCYH --- .github/workflows/add-docs-link-comment.yml | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/add-docs-link-comment.yml diff --git a/.github/workflows/add-docs-link-comment.yml b/.github/workflows/add-docs-link-comment.yml new file mode 100644 index 0000000..4a51a70 --- /dev/null +++ b/.github/workflows/add-docs-link-comment.yml @@ -0,0 +1,25 @@ +name: Add PR comment + +on: + pull_request: + types: + - opened + +jobs: + comment: + runs-on: ubuntu-latest + steps: + - name: Add PR comment with doc link + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const prNumber = context.payload.pull_request.number; + const commentBody = `Link to docs build: https://canonical-kteam-docs--${prNumber}.com.readthedocs.build/en/${prNumber}/`; + + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: prNumber, + body: commentBody + }); From 02532391a55808b56efb991fdc0d325f0b9d59b6 Mon Sep 17 00:00:00 2001 From: AnneCYH Date: Tue, 11 Mar 2025 14:53:50 +0800 Subject: [PATCH 3/6] Update add-docs-link-comment.yml Signed-off-by: AnneCYH --- .github/workflows/add-docs-link-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-docs-link-comment.yml b/.github/workflows/add-docs-link-comment.yml index 4a51a70..1655617 100644 --- a/.github/workflows/add-docs-link-comment.yml +++ b/.github/workflows/add-docs-link-comment.yml @@ -15,7 +15,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const prNumber = context.payload.pull_request.number; - const commentBody = `Link to docs build: https://canonical-kteam-docs--${prNumber}.com.readthedocs.build/en/${prNumber}/`; + const commentBody = `Link to docs build: https://canonical-kernel-docs--${prNumber}.com.readthedocs.build/en/${prNumber}/`; github.rest.issues.createComment({ owner: context.repo.owner, From e5e26450906b683584d6ab0eb5f8b58d7dd220bf Mon Sep 17 00:00:00 2001 From: AnneCYH Date: Tue, 11 Mar 2025 14:55:22 +0800 Subject: [PATCH 4/6] Update add-docs-link.yaml Signed-off-by: AnneCYH --- .github/add-docs-link.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/add-docs-link.yaml b/.github/add-docs-link.yaml index 4a51a70..69137e3 100644 --- a/.github/add-docs-link.yaml +++ b/.github/add-docs-link.yaml @@ -6,7 +6,7 @@ on: - opened jobs: - comment: + rtd_build_link: runs-on: ubuntu-latest steps: - name: Add PR comment with doc link From 5ba1eeac45ce6b8b5587129f8112ec2a95918c88 Mon Sep 17 00:00:00 2001 From: AnneCYH Date: Tue, 11 Mar 2025 14:57:56 +0800 Subject: [PATCH 5/6] Delete .github/add-docs-link.yaml Signed-off-by: AnneCYH --- .github/add-docs-link.yaml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/add-docs-link.yaml diff --git a/.github/add-docs-link.yaml b/.github/add-docs-link.yaml deleted file mode 100644 index 69137e3..0000000 --- a/.github/add-docs-link.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Add PR comment - -on: - pull_request: - types: - - opened - -jobs: - rtd_build_link: - runs-on: ubuntu-latest - steps: - - name: Add PR comment with doc link - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const prNumber = context.payload.pull_request.number; - const commentBody = `Link to docs build: https://canonical-kteam-docs--${prNumber}.com.readthedocs.build/en/${prNumber}/`; - - github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber, - body: commentBody - }); From 934db8a7d3b57e79632373d5050ed5fd78a2c484 Mon Sep 17 00:00:00 2001 From: AnneCYH Date: Thu, 13 Mar 2025 09:56:12 +0800 Subject: [PATCH 6/6] Update .github/workflows/add-docs-link-comment.yml Co-authored-by: Benjamin Wheeler <34549440+benjamin051000@users.noreply.github.com> Signed-off-by: AnneCYH --- .github/workflows/add-docs-link-comment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/add-docs-link-comment.yml b/.github/workflows/add-docs-link-comment.yml index 1655617..414b00d 100644 --- a/.github/workflows/add-docs-link-comment.yml +++ b/.github/workflows/add-docs-link-comment.yml @@ -1,4 +1,4 @@ -name: Add PR comment +name: Comment link to ReadTheDocs build on: pull_request: