diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e20cd300e..64c9fdca2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,25 +1,11 @@ -name: Move to project +name: Handle newly opened issues on: issues: types: - opened - - labeled jobs: - add-to-feature-board: - name: Add issue to feature request board - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v0.3.0 - with: - # You can target a repository in a different organization - # to the issue - project-url: https://github.com/orgs/vantage6/projects/3 - github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} - labeled: feature-request - label-operator: OR - add-to-HOTFIX-board: name: Add issue to HOTFIX request board runs-on: ubuntu-latest @@ -32,3 +18,18 @@ jobs: github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} labeled: bug label-operator: OR + + add-new-label: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ["New"] + })