diff --git a/.github/workflows/docs-label.yaml b/.github/workflows/docs-label.yaml new file mode 100644 index 00000000..5fd64b02 --- /dev/null +++ b/.github/workflows/docs-label.yaml @@ -0,0 +1,28 @@ +# opens an issue in https://github.com/dbt-labs/docs-internal when a pr labeled with "needs-docs" is merged. + +name: Open issues in docs-internal repo when a PR is merged +run-name: "Create an issue in docs-internal for PR #${{ github.event.pull_request.number }}" + +on: + pull_request_target: + types: [labeled, closed] + +permissions: + issues: write + +jobs: + create-issue: + # Only run this job when a PR is merged and has the 'needs-docs' label + if: | + github.event.pull_request.merged == true && + contains(github.event.pull_request.labels.*.name, 'needs-docs') + uses: dbt-labs/actions/.github/workflows/open-issue-in-repo.yml@main + with: + issue_repository: "dbt-labs/docs-internal" + issue_title: "Release Note: Changes from ${{ github.event.repository.name }} PR #${{ github.event.pull_request.number }}" + issue_body: | + Please review the merged PR and create appropriate release notes or updates in the documentation. + Feel free to ping the author (@${{ github.event.pull_request.user.login }}) directly if you have any questions! + Link to the merged PR: ${{ github.event.pull_request.html_url }} + secrets: + FISHTOWN_BOT_PAT: ${{ secrets.FA_ASSISTANT_CI_WORKFLOW_PAT_TOKEN }}