diff --git a/.github/workflows/github-issues-add-issue-to-epic.yml b/.github/workflows/repository-add-issue-to-epic.yml similarity index 85% rename from .github/workflows/github-issues-add-issue-to-epic.yml rename to .github/workflows/repository-add-issue-to-epic.yml index 953bb4ce78..13afa92e0e 100644 --- a/.github/workflows/github-issues-add-issue-to-epic.yml +++ b/.github/workflows/repository-add-issue-to-epic.yml @@ -1,21 +1,28 @@ -name: Add Issue to Epic +--- +name: Add issue to epic -on: +on: # yamllint disable-line rule:truthy issues: - types: [labeled] + types: + - labeled concurrency: group: add-issue-to-epic cancel-in-progress: false +permissions: read-all + jobs: - update_epic_description: + add-issue-to-epic: runs-on: ubuntu-latest + permissions: + issues: write steps: - - name: Amend Epic Description with New Item - uses: actions/github-script@v7.0.1 + - name: Add issue to Epic + id: add_issue_to_epic + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | console.log("Starting script..."); const payload = context.payload; diff --git a/.github/workflows/github-issues-create-epic-label.yml b/.github/workflows/repository-create-epic-label.yml similarity index 74% rename from .github/workflows/github-issues-create-epic-label.yml rename to .github/workflows/repository-create-epic-label.yml index 65306b191d..2dfb18a024 100644 --- a/.github/workflows/github-issues-create-epic-label.yml +++ b/.github/workflows/repository-create-epic-label.yml @@ -1,23 +1,30 @@ -name: Create Epic Label +--- +name: Create epic label -on: +on: # yamllint disable-line rule:truthy issues: - types: [labeled] + types: + - labeled -# Ensure the workflow runs only once at a time concurrency: group: create-epic-label cancel-in-progress: true +permissions: read-all + jobs: - create_epic_label: - runs-on: ubuntu-latest + create-epic-label: if: github.event.label.name == 'Epic' + name: Create epic label + runs-on: ubuntu-latest + permissions: + issues: write steps: - - name: Check if Epic and Create Label - uses: actions/github-script@v7.0.1 + - name: Create epic label + id: create_epic_label + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const issueTitle = context.payload.issue.title; const issueNumber = context.payload.issue.number; diff --git a/.github/workflows/github-issues-remove-issue-from-epic.yml b/.github/workflows/repository-remove-issue-from-epic.yml similarity index 82% rename from .github/workflows/github-issues-remove-issue-from-epic.yml rename to .github/workflows/repository-remove-issue-from-epic.yml index fd0b8771f8..76a70d9980 100644 --- a/.github/workflows/github-issues-remove-issue-from-epic.yml +++ b/.github/workflows/repository-remove-issue-from-epic.yml @@ -1,20 +1,28 @@ -name: Remove Issue from Epic Description +--- +name: Remove issue from epic -on: +on: # yamllint disable-line rule:truthy issues: - types: [unlabeled] + types: + - unlabeled + concurrency: group: remove-issue-from-epic cancel-in-progress: false +permissions: read-all + jobs: - remove_from_epic_description: + remove-issue-from-epic: + name: Remove Issue from epic runs-on: ubuntu-latest + permissions: + issues: write steps: - - name: Remove Issue Link from Epic Description - uses: actions/github-script@v7.0.1 + - name: Remove issue from epic + uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const payload = context.payload; const issueNumber = payload.issue.number;