Skip to content
send

GitHub Action

Issues to Project

1.1.0 Latest version

Issues to Project

send

Issues to Project

Automating the attachment of Issues to Projects

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Issues to Project

uses: tcassou/[email protected]

Learn more about this action in tcassou/project-bot

Choose a version

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/[email protected]
      with:
        project_url: 'https://github.com/orgs/foo/projects/123'