https://github.com/factbirdhq/action-add-pr-to-project
Adds a PR to the specified Project
https://github.com/factbirdhq/action-add-pr-to-project
Last synced: 3 months ago
JSON representation
Adds a PR to the specified Project
- Host: GitHub
- URL: https://github.com/factbirdhq/action-add-pr-to-project
- Owner: FactbirdHQ
- License: mit
- Created: 2020-02-03T19:28:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:49:09.000Z (almost 2 years ago)
- Last Synced: 2025-03-21T12:17:45.008Z (3 months ago)
- Language: TypeScript
- Size: 2.19 MB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Add Pull Request to Project
A GitHub action that lets you automatically add Pull Requests to your Projects.
You will need the Column ID of the specific column it should go into. Extract this by clicking on the `...` of the column, choosing "Copy column link" and then taking the last number of the URL, e.g. in `https://github.com/orgs/BlackbirdHQ/projects/99999#column-123456` the Column ID is `123456`.
# Example Workflow
```yml
name: 'Bot: Add Pull Request to Project'
on:
pull_request:
types:
# Only add it when the PR is opened.
- openedjobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: BlackbirdHQ/action-add-pr-to-project@release/v1
with:
# The Column ID of the project
columnId: 123456
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.GITHUB_TOKEN }} # Or custom secrets.ORG_GITHUB_TOKEN
```**Note:** If you want to add the PR to a project that's not in the repo itself, you will need to create an access token with the permissions for this. For example, in the screenshot below, I'm setting up a token to add the PR to an organization project, and storing it in secrets under `ORG_GITHUB_TOKEN`.
The `token` is used to get the PR id and information, while the `projectToken` might have a different access scope, and is used to add the PR to the project.
![]()