srggrs / assign-one-project-github-action

Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for just the project_number

woodie opened this issue · comments

We should have $GITHUB_SERVER_URL and $GITHUB_REPOSITORY in the environment. Any chance we can make this more portable by accepting a project number?

jobs:
  add-new-issues:
    runs-on: ubuntu-latest
    steps:
      - uses: srggrs/assign-one-project-github-action@1.2.1
        with:
          project_number: 1

Actually, this works just fine as well.

name: Add new issues to project board

on:
  issues:
    types: [opened]

env:
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
  add-new-issues:
    runs-on: ubuntu-latest
    steps:
      - uses: srggrs/assign-one-project-github-action@1.2.1
        with:
          project: 'https://github.com/${{ github.repository }}/projects/1'