From 4ef52af34a306e8e69dd0898d3e397ce2a2097f6 Mon Sep 17 00:00:00 2001 From: egenerse Date: Fri, 18 Oct 2024 15:37:13 +0200 Subject: [PATCH 1/2] add workflow for adding new issues from issues and prs --- .github/workflows/add-issue-to-project.yml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/add-issue-to-project.yml diff --git a/.github/workflows/add-issue-to-project.yml b/.github/workflows/add-issue-to-project.yml new file mode 100644 index 00000000..6639a8f9 --- /dev/null +++ b/.github/workflows/add-issue-to-project.yml @@ -0,0 +1,28 @@ +name: Add New Issue or PR to Project + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + add_to_project: + runs-on: ubuntu-latest + + steps: + - name: Add issue to project + if: github.event_name == 'issues' + uses: actions/add-to-project@v1 + with: + project-url: https://github.com/orgs/ls1intum/projects/75 + github-token: ${{ secrets.GITHUB_TOKEN }} + content-id: ${{ github.event.issue.node_id }} + + - name: Add pull request to project + if: github.event_name == 'pull_request' + uses: actions/add-to-project@v1 + with: + project-url: https://github.com/orgs/ls1intum/projects/75 + github-token: ${{ secrets.GITHUB_TOKEN }} + content-id: ${{ github.event.pull_request.node_id }} From ac34e53aef0007388cb33f657223e6d518b2437a Mon Sep 17 00:00:00 2001 From: egenerse Date: Fri, 18 Oct 2024 15:39:06 +0200 Subject: [PATCH 2/2] fix: action version fix --- .github/workflows/add-issue-to-project.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/add-issue-to-project.yml b/.github/workflows/add-issue-to-project.yml index 6639a8f9..5c121a44 100644 --- a/.github/workflows/add-issue-to-project.yml +++ b/.github/workflows/add-issue-to-project.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Add issue to project if: github.event_name == 'issues' - uses: actions/add-to-project@v1 + uses: actions/add-to-project@RELEASE_VERSION with: project-url: https://github.com/orgs/ls1intum/projects/75 github-token: ${{ secrets.GITHUB_TOKEN }} @@ -21,7 +21,7 @@ jobs: - name: Add pull request to project if: github.event_name == 'pull_request' - uses: actions/add-to-project@v1 + uses: actions/add-to-project@RELEASE_VERSION with: project-url: https://github.com/orgs/ls1intum/projects/75 github-token: ${{ secrets.GITHUB_TOKEN }}