From f08c5fa03a6c6ff2b8e049d8f2b6c18f69ecdd87 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Wed, 18 Feb 2026 08:37:31 +0100 Subject: [PATCH] Assign no-stale to Tasks/Epic/Opportunity issue type (#29698) * Enhance issue creation restrictions and labeling Added functionality to restrict Task issue creation to organization members, authorized contributors, and integration code owners. Updated permissions and added a no-stale label for specific issue types. * Refactor Task issue authorization checks * Update github-script action and enhance Task issue handling --- .github/workflows/restrict-task-creation.yml | 31 +++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/restrict-task-creation.yml b/.github/workflows/restrict-task-creation.yml index e1b3c14519..778dd051ec 100644 --- a/.github/workflows/restrict-task-creation.yml +++ b/.github/workflows/restrict-task-creation.yml @@ -5,9 +5,38 @@ on: issues: types: [opened] +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.event.issue.number }} + jobs: - check-authorization: + add-no-stale: + name: Add no-stale label runs-on: ubuntu-latest + permissions: + issues: write # To add labels to issues + if: >- + github.event.issue.type.name == 'Task' + || github.event.issue.type.name == 'Epic' + || github.event.issue.type.name == 'Opportunity' + steps: + - name: Add no-stale label + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + with: + script: | + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['no-stale'] + }); + + check-authorization: + name: Check authorization + runs-on: ubuntu-latest + permissions: + issues: write # To comment on, label, and close issues # Only run if this is a Task issue type (from the issue form) if: github.event.issue.type.name == 'Task' steps: