From 4bc7d8f1af01a4a5739109cc1234c961da6d09c1 Mon Sep 17 00:00:00 2001 From: Nick Meyer Date: Mon, 13 Feb 2023 17:32:14 -0600 Subject: [PATCH] add workflow for auto-labeling docs repo PRs --- auto-label-doc-repos.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 auto-label-doc-repos.yml diff --git a/auto-label-doc-repos.yml b/auto-label-doc-repos.yml new file mode 100644 index 0000000..4cbebb7 --- /dev/null +++ b/auto-label-doc-repos.yml @@ -0,0 +1,20 @@ +on: + pull_request: + types: [opened] + +name: Auto-label new PRs + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + github-token: ${{ secrets.DOCS_GH_PAT }} + script: | + const labels = ['type::feature', 'type::docs'] + github.rest.issues.addLabels({ + ...context.repo, + issue_number: context.issue.number, + labels + })