From cb4bc2d6e993a36d84402f1e82998325e269c080 Mon Sep 17 00:00:00 2001 From: Emily Rockman Date: Tue, 15 Aug 2023 14:20:46 -0500 Subject: [PATCH] Automate opening docs issues (#8373) * first pass * WIP * update issue body * fix triggering label * fix docs * add better run name * reduce complexity * update description * fix PR title * point at workflow on main * fix wording * add label --- .github/workflows/docs-issue.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/docs-issue.yml diff --git a/.github/workflows/docs-issue.yml b/.github/workflows/docs-issue.yml new file mode 100644 index 00000000000..c32c2a5191d --- /dev/null +++ b/.github/workflows/docs-issue.yml @@ -0,0 +1,36 @@ +# **what?** +# Open an issue in docs.getdbt.com when a PR is labeled `user docs` + +# **why?** +# To reduce barriers for keeping docs up to date + +# **when?** +# When a PR is labeled `user docs` and is merged + + +name: Open issues in docs.getdbt.com repo when a PR is labeled +run-name: "Open an issue in docs.getdbt.com for PR #${{ github.event.pull_request.number }}" + +on: + pull_request: + types: [labeled, closed] + +defaults: + run: + shell: bash + +permissions: + issues: write # opens new issues + pull-requests: write # comments on PRs + + +jobs: + open_issues: + if: contains( github.event.pull_request.labels.*.name, 'user docs') && github.event.pull_request.merged == true + uses: dbt-labs/actions/.github/workflows/open-issue-in-repo.yml@main + with: + issue_repository: "dbt-labs/docs.getdbt.com" + issue_title: "Docs Changes Needed from ${{ github.event.repository.name }} PR #${{ github.event.pull_request.number }}" + issue_labels: "content,improvement,dbt Core" + issue_body: "At a minimum, update body to include a link to the page on docs.getdbt.com requiring updates and what part(s) of the page you would like to see updated." + secrets: inherit