From c802b1c1b961d2efdb745ce2a409b234820a25fc Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 31 Aug 2023 19:33:24 -0700 Subject: [PATCH] ci: add new issues and pull requests to project board (#3332) --- .github/workflows/add-to-project.yml | 36 ++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/add-to-project.yml diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 0000000000..d2ddc59c53 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,36 @@ +name: Add to Ecosystem WG Project + +on: + issues: + types: + - opened + pull_request: + types: + - opened + +permissions: {} + +jobs: + add-to-project: + runs-on: ubuntu-latest + steps: + - name: Generate GitHub App token + uses: electron/github-app-auth-action@cc6751b3b5e4edc5b9a4ad0a021ac455653b6dc8 # v1.0.0 + id: generate-token + with: + creds: ${{ secrets.ECOSYSTEM_ISSUE_TRIAGE_GH_APP_CREDS }} + org: electron + - name: Add to Project + uses: actions/add-to-project@31b3f3ccdc584546fc445612dec3f38ff5edb41c # v0.5.0 + with: + project-url: https://github.com/orgs/electron/projects/89 + github-token: ${{ steps.generate-token.outputs.token }} + - name: Set Opened Field + uses: dsanders11/update-project-action@6a5f3732ca6206a788b57e106b86a5caa7d55062 + with: + github_token: ${{ steps.generate-token.outputs.token }} + organization: electron + project_number: 89 + content_id: ${{ github.event.pull_request.node_id || github.event.issue.node_id }} + field: Opened + value: ${{ github.event.pull_request.created_at || github.event.issue.created_at }}