From e124cf5c1a89430c5292c20bf052aad4dfeaf105 Mon Sep 17 00:00:00 2001 From: Muhammad Taha Naveed Date: Wed, 10 Jul 2024 04:50:02 +0500 Subject: [PATCH] [CI] Update labeler github action (#1851) (#1862) - This action will now add "override-stale" label to the PRs that are by apache/age committers, this will prevent stale action from touching these PRs. --- .github/workflows/labeler.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 22c21ebe7..4234e3582 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,4 +9,19 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v5.0.0-alpha.1 \ No newline at end of file + - name: Apply branch labels + uses: actions/labeler@v5.0.0 + + - name: Apply label based on author + if: | + contains('["jrgemignani", "dehowef", "eyab" "rafsun42", "Zainab-Saad", "MuhammadTahaNaveed"]', github.event.pull_request.user.login) + uses: actions/github-script@v7 + with: + script: | + const labelsToAdd = ['override-stale']; + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: labelsToAdd + });