Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.6 KB

README.md

File metadata and controls

39 lines (32 loc) · 1.6 KB

Issues to Project Github Action

Lint and Test

This Github Action automated the the addition of issues to a given Github Project. It uses the Github GraphQL API under the hood, and is compatible with the recently revamped projects.

Setup

This action will need to authenticate to get access to your repositories and projects via the Github API. For this, create a Personal Access Token and store it as a Github secret in the repository where your actions are going to run. The script expects a GITHUB_API_TOKEN environment variable containing your token, regardless of the name you choose for your secret (see example below).

Inputs

project_url

Required URL of the Github project that issues should be added to. Examples:

Example usage

In your workflow file under ./.github/workflows:

name: Add Issues to Project

on:
  issues:
    types: [opened]
env:
  GITHUB_API_TOKEN: ${{ secrets.MY_API_TOKEN }}

jobs:
  add_to_project:
    runs-on: ubuntu-latest
    steps:
    - name: Assign new issues to the project
      uses: tcassou/project-bot@2.0.0
      with:
        project_url: 'https://github.com/orgs/foo/projects/123'