From 3f58c14b11f8edc765a043f093b6a7b699ff10dd Mon Sep 17 00:00:00 2001 From: xchapter7x Date: Tue, 21 Apr 2020 09:21:02 -0400 Subject: [PATCH] replace labeler action with periodic-labeler this replaces the default labeler as it does not label PRs from forks properly. with periodic-labeler it should apply labels on a cron to any PR and resolve the below bug: https://github.com/spf13/cobra/issues/1092 --- .github/workflows/label.yml | 19 ------------------- .github/workflows/periodic-labeler.yml | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/label.yml create mode 100644 .github/workflows/periodic-labeler.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index e90b599b..00000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,19 +0,0 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler/blob/master/README.md - -name: Labeler -on: [pull_request] - -jobs: - label: - - runs-on: ubuntu-latest - - steps: - - uses: actions/labeler@v2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/periodic-labeler.yml b/.github/workflows/periodic-labeler.yml new file mode 100644 index 00000000..147743d4 --- /dev/null +++ b/.github/workflows/periodic-labeler.yml @@ -0,0 +1,14 @@ +--- +name: Pull request labeler +on: + schedule: + - cron: '*/5 * * * *' +jobs: + labeler: + runs-on: ubuntu-latest + steps: + - uses: paulfantom/periodic-labeler@v0.0.2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + LABEL_MAPPINGS_FILE: .github/labeler.yml