Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.4.1 to 29.4.5. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.4.1...v29.4.5) --- updated-dependencies: - dependency-name: ts-jest dependency-version: 29.4.5 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
actions/add-to-project
Use this action to automatically add the current issue or pull request to a GitHub project. Note that this action does not support GitHub projects (classic).
Current Status
Usage
See action.yml for metadata that defines the inputs, outputs, and runs configuration for this action.
For more information about workflows, see Using workflows.
Create a workflow that runs when Issues or Pull Requests are opened or labeled in your repository; this workflow also supports adding Issues to your project which are transferred into your repository. Optionally configure any filters you may want to add, such as only adding issues with certain labels. You may match labels with an AND or an OR operator, or exclude labels with a NOT operator.
Once you've configured your workflow, save it as a .yml file in your target Repository's .github/workflows directory.
Examples
Example Usage: Issue opened with labels bug OR needs-triage
name: Add bugs to bugs project
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@RELEASE_VERSION
with:
# You can target a project in a different organization
# to the issue
project-url: https://github.com/orgs/<orgName>/projects/<projectNumber>
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: bug, needs-triage
label-operator: OR
Example Usage: Adds all issues opened that do not include the label bug OR needs-triage
name: Adds all issues that don't include the 'bug' or 'needs-triage' labels to project board
on:
issues:
types:
- opened
jobs:
add-to-project:
name: Add issue to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@RELEASE_VERSION
with:
project-url: https://github.com/orgs/<orgName>/projects/<projectNumber>
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: bug, needs-triage
label-operator: NOT
Example Usage: Pull Requests labeled with needs-review and size/XL
name: Add needs-review and size/XL pull requests to projects
on:
pull_request:
types:
- labeled
jobs:
add-to-project:
name: Add pull request to project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@RELEASE_VERSION
with:
project-url: https://github.com/orgs/<orgName>/projects/<projectNumber>
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: needs-review, size/XL
label-operator: AND
Further reading and additional resources
- actions/add-to-project
- License
Inputs
project-url(required) is the URL of the GitHub project to add issues to. eg:https://github.com/orgs|users/<ownerName>/projects/<projectNumber>github-token(required) is a personal access token withrepoandprojectscopes. See Creating a PAT and adding it to your repository for more detailslabeled(optional) is a comma-separated list of labels used to filter applicable issues. When this key is provided, an issue must have one of the labels in the list to be added to the project. Omitting this key means that any issue will be added.label-operator(optional) is the behavior of the labels filter, eitherAND,ORorNOTthat controls if the issue should be matched withalllabeledinput or any of them, default isOR.
Supported Events
Currently this action supports the following issues events:
openedreopenedtransferredlabeled
and the following pull_request events:
openedreopenedlabeled
Using these events ensure that a given issue or pull request, in the workflow's repo, is added to the specified project. If labeled input(s) are defined, then issues will only be added if they contain at least one of the labels in the list.
Creating a PAT and adding it to your repository
-
Create a new personal access token. See Creating a personal access token for more information
- For Tokens (classic) include the
projectscope; for private repos you will also needreposcope. - For Fine-grained tokens, you must first select the appropriate owner and associated repositories. Then select Organization permissions ->
projectsread & write, and Repository permissions ->issuesread-onlyandpull requestsread-only.
- For Tokens (classic) include the
-
add the newly created PAT as a repository secret, this secret will be referenced by the github-token input See Encrypted secrets for more information
Setting a specific status or column name to the project item
If you want to add an issue to a custom default column in a project (i.e. other than 'Todo'), you can do this directly via the project UI. You don't need to add anything else to your YAML workflow file to get this to work.
Use the Add To GitHub Projects action to assign newly opened issues to the project. And then in the project UI simply specify which column to use as the default!
Development
To get started contributing to this project, clone it and install dependencies. Note that this action runs in Node.js 20.x, so we recommend using that version of Node (see "engines" in this action's package.json for details).
> git clone https://github.com/actions/add-to-project
> cd add-to-project
> npm install
Or, use GitHub Codespaces.
See the toolkit documentation for the various packages used in building this action.
Publish to a distribution branch
Actions are run from GitHub repositories, so we check in the packaged action in the "dist/" directory.
> npm run build
> git add lib dist
> git commit -a -m "Build and package"
> git push origin releases/v1
Now, a release can be created from the branch containing the built action.
License
The scripts and documentation in this project are released under the MIT License