{"id":13566774,"url":"https://github.com/actions/add-to-project","last_synced_at":"2025-05-14T00:10:09.518Z","repository":{"id":37090051,"uuid":"454132203","full_name":"actions/add-to-project","owner":"actions","description":"Automate adding issues and pull requests to GitHub projects","archived":false,"fork":false,"pushed_at":"2025-04-21T18:34:05.000Z","size":5127,"stargazers_count":605,"open_issues_count":35,"forks_count":100,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-05T19:12:41.771Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-01-31T18:58:52.000Z","updated_at":"2025-04-30T18:47:47.000Z","dependencies_parsed_at":"2023-01-05T04:50:57.832Z","dependency_job_id":"d7e5cec7-7800-49da-9fa2-c47195a0260c","html_url":"https://github.com/actions/add-to-project","commit_stats":{"total_commits":438,"total_committers":26,"mean_commits":"16.846153846153847","dds":0.3105022831050228,"last_synced_commit":"f5473ace9aeee8b97717b281e26980aa5097023f"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fadd-to-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fadd-to-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fadd-to-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actions%2Fadd-to-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actions","download_url":"https://codeload.github.com/actions/add-to-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044264,"owners_count":22005118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:02:16.561Z","updated_at":"2025-05-14T00:10:04.508Z","avatar_url":"https://github.com/actions.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","📖 Category Details"],"sub_categories":["**8. Task Automation \u0026 Project Management**"],"readme":"# actions/add-to-project\n\nUse this action to automatically add the current issue or pull request to a [GitHub project](https://docs.github.com/en/issues/trying-out-the-new-projects-experience/about-projects).\nNote that this action does not support [GitHub projects (classic)](https://docs.github.com/en/issues/organizing-your-work-with-project-boards).\n\n## Current Status\n\n[![build-test](https://github.com/actions/add-to-project/actions/workflows/test.yml/badge.svg)](https://github.com/actions/add-to-project/actions/workflows/test.yml)\n\n## Usage\n\n_See [action.yml](action.yml) for [metadata](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions) that defines the inputs, outputs, and runs configuration for this action._\n\n_For more information about workflows, see [Using workflows](https://docs.github.com/en/actions/using-workflows)._\n\nCreate 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.\n\nOnce you've configured your workflow, save it as a `.yml` file in your target Repository's `.github/workflows` directory.\n\n### Examples\n\n#### Example Usage: Issue opened with labels `bug` OR `needs-triage`\n\n```yaml\nname: Add bugs to bugs project\n\non:\n  issues:\n    types:\n      - opened\n\njobs:\n  add-to-project:\n    name: Add issue to project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/add-to-project@RELEASE_VERSION\n        with:\n          # You can target a project in a different organization\n          # to the issue\n          project-url: https://github.com/orgs/\u003corgName\u003e/projects/\u003cprojectNumber\u003e\n          github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}\n          labeled: bug, needs-triage\n          label-operator: OR\n```\n\n#### Example Usage: Adds all issues opened that do not include the label `bug` OR `needs-triage`\n\n```yaml\nname: Adds all issues that don't include the 'bug' or 'needs-triage' labels to project board\n\non:\n  issues:\n    types:\n      - opened\n\njobs:\n  add-to-project:\n    name: Add issue to project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/add-to-project@RELEASE_VERSION\n        with:\n          project-url: https://github.com/orgs/\u003corgName\u003e/projects/\u003cprojectNumber\u003e\n          github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}\n          labeled: bug, needs-triage\n          label-operator: NOT\n```\n\n#### Example Usage: Pull Requests labeled with `needs-review` and `size/XL`\n\n```yaml\nname: Add needs-review and size/XL pull requests to projects\n\non:\n  pull_request:\n    types:\n      - labeled\n\njobs:\n  add-to-project:\n    name: Add pull request to project\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/add-to-project@RELEASE_VERSION\n        with:\n          project-url: https://github.com/orgs/\u003corgName\u003e/projects/\u003cprojectNumber\u003e\n          github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}\n          labeled: needs-review, size/XL\n          label-operator: AND\n```\n\n### Further reading and additional resources\n\n- [actions/add-to-project](#actionsadd-to-project)\n  - [Current Status](#current-status)\n  - [Usage](#usage)\n    - [Examples](#examples)\n      - [Example Usage: Issue opened with labels `bug` OR `needs-triage`](#example-usage-issue-opened-with-labels-bug-or-needs-triage)\n      - [Example Usage: Adds all issues opened that do not include the label `bug` OR `needs-triage`](#example-usage-adds-all-issues-opened-that-do-not-include-the-label-bug-or-needs-triage)\n      - [Example Usage: Pull Requests labeled with `needs-review` and `size/XL`](#example-usage-pull-requests-labeled-with-needs-review-and-sizexl)\n    - [Further reading and additional resources](#further-reading-and-additional-resources)\n  - [Inputs](#inputs)\n  - [Supported Events](#supported-events)\n  - [Creating a PAT and adding it to your repository](#creating-a-pat-and-adding-it-to-your-repository)\n  - [Development](#development)\n  - [Publish to a distribution branch](#publish-to-a-distribution-branch)\n- [License](#license)\n\n## Inputs\n\n- \u003ca name=\"project-url\"\u003e`project-url`\u003c/a\u003e **(required)** is the URL of the GitHub project to add issues to.\n  _eg: `https://github.com/orgs|users/\u003cownerName\u003e/projects/\u003cprojectNumber\u003e`_\n- \u003ca name=\"github-token\"\u003e`github-token`\u003c/a\u003e **(required)** is a [personal access\n  token](https://github.com/settings/tokens/new) with `repo` and `project` scopes.\n  _See [Creating a PAT and adding it to your repository](#creating-a-pat-and-adding-it-to-your-repository) for more details_\n- \u003ca name=\"labeled\"\u003e`labeled`\u003c/a\u003e **(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.\n- \u003ca name=\"labeled\"\u003e`label-operator`\u003c/a\u003e **(optional)** is the behavior of the labels filter, either `AND`, `OR` or `NOT` that controls if the issue should be matched with `all` `labeled` input or any of them, default is `OR`.\n\n## Supported Events\n\nCurrently this action supports the following [`issues` events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues):\n\n- `opened`\n- `reopened`\n- `transferred`\n- `labeled`\n\nand the following [`pull_request` events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request):\n\n- `opened`\n- `reopened`\n- `labeled`\n\nUsing these events ensure that a given issue or pull request, in the workflow's repo, is added to the [specified project](#project-url). If [labeled input(s)](#labeled) are defined, then issues will only be added if they contain at least _one_ of the labels in the list.\n\n## Creating a PAT and adding it to your repository\n\n- Create a new [personal access token](https://github.com/settings/tokens/new). _See [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) for more information_\n\n  - For **Tokens (classic)** include the `project` scope; for private repos you will also need `repo` scope.\n  - For **Fine-grained tokens**, you must first select the appropriate _owner_ and associated _repositories_. Then select _Organization permissions -\u003e `projects` `read \u0026 write`_, and _Repository permissions -\u003e `issues` `read-only`_ and _`pull requests` `read-only`_.\n\n- add the newly created PAT as a repository secret, this secret will be referenced by the [github-token input](#github-token)\n  _See [Encrypted secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) for more information_\n\n## Setting a specific status or column name to the project item\n\nIf 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.\n\nUse the [Add To GitHub Projects](https://github.com/marketplace/actions/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](https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/quickstart-for-projects#configure-built-in-automation)!\n\n## Development\n\nTo get started contributing to this project, clone it and install dependencies.\nNote that this action runs in Node.js 20.x, so we recommend using that version\nof Node (see \"engines\" in this action's package.json for details).\n\n```shell\n\u003e git clone https://github.com/actions/add-to-project\n\u003e cd add-to-project\n\u003e npm install\n```\n\nOr, use [GitHub Codespaces](https://github.com/features/codespaces).\n\nSee the [toolkit\ndocumentation](https://github.com/actions/toolkit/blob/master/README.md#packages)\nfor the various packages used in building this action.\n\n## Publish to a distribution branch\n\nActions are run from GitHub repositories, so we check in the packaged action in\nthe \"dist/\" directory.\n\n```shell\n\u003e npm run build\n\u003e git add lib dist\n\u003e git commit -a -m \"Build and package\"\n\u003e git push origin releases/v1\n```\n\nNow, a release can be created from the branch containing the built action.\n\n## License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fadd-to-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factions%2Fadd-to-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factions%2Fadd-to-project/lists"}