From 867c0f57126cf3e3196be4ff45cff4f0e4eb7bca Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Mon, 18 Dec 2023 08:00:36 -0700 Subject: [PATCH 1/3] Add workflow to update PRs with docs preview link in description --- .github/workflows/pr-rtd-link.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/pr-rtd-link.yml diff --git a/.github/workflows/pr-rtd-link.yml b/.github/workflows/pr-rtd-link.yml new file mode 100644 index 00000000..2d39b56d --- /dev/null +++ b/.github/workflows/pr-rtd-link.yml @@ -0,0 +1,19 @@ +# The ReadTheDocs preview link is "hidden" within the GitHub "Checks" +# interface. For users who don't know this, finding the preview link may be +# very difficult or frustrating. This workflow makes the link more +# findable by updating PR descriptions to include it. +name: "Add ReadTheDocs preview link to PR descriptions" + +on: + pull_request_target: + +permissions: + pull-requests: "write" + +jobs: + autolink-rtd-previews: + runs-on: "ubuntu-latest" + steps: + - uses: "readthedocs/actions/preview@v1" + with: + project-slug: "earthaccess" From d386e13890150762f717e016f76db48a30642121 Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Tue, 19 Dec 2023 13:40:00 -0700 Subject: [PATCH 2/3] Only execute action on PR open Co-authored-by: Joseph H Kennedy --- .github/workflows/pr-rtd-link.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pr-rtd-link.yml b/.github/workflows/pr-rtd-link.yml index 2d39b56d..decc1d25 100644 --- a/.github/workflows/pr-rtd-link.yml +++ b/.github/workflows/pr-rtd-link.yml @@ -6,6 +6,8 @@ name: "Add ReadTheDocs preview link to PR descriptions" on: pull_request_target: + types: + - opened permissions: pull-requests: "write" From 7e0038fa5769b3b81b8009b75d749e51e4f9f4ab Mon Sep 17 00:00:00 2001 From: Matt Fisher Date: Wed, 20 Dec 2023 11:16:06 -0700 Subject: [PATCH 3/3] Format with prettier --- .github/workflows/pr-rtd-link.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-rtd-link.yml b/.github/workflows/pr-rtd-link.yml index decc1d25..b4e9efc7 100644 --- a/.github/workflows/pr-rtd-link.yml +++ b/.github/workflows/pr-rtd-link.yml @@ -7,7 +7,7 @@ name: "Add ReadTheDocs preview link to PR descriptions" on: pull_request_target: types: - - opened + - opened permissions: pull-requests: "write"