{"id":16123572,"url":"https://github.com/austenstone/project-add","last_synced_at":"2025-03-18T12:31:25.306Z","repository":{"id":42506911,"uuid":"467723884","full_name":"austenstone/project-add","owner":"austenstone","description":"Add issues to projects (beta)","archived":false,"fork":false,"pushed_at":"2023-01-08T01:00:12.000Z","size":821,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T09:18:07.022Z","etag":null,"topics":["actions","github","github-actions","projects"],"latest_commit_sha":null,"homepage":"https://docs.github.com/en/issues/trying-out-the-new-projects-experience","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/austenstone.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":null,"security":"SECURITY.md","support":null}},"created_at":"2022-03-09T00:36:44.000Z","updated_at":"2023-03-04T00:37:27.000Z","dependencies_parsed_at":"2023-02-08T04:01:08.457Z","dependency_job_id":null,"html_url":"https://github.com/austenstone/project-add","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fproject-add","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fproject-add/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fproject-add/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austenstone%2Fproject-add/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austenstone","download_url":"https://codeload.github.com/austenstone/project-add/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243926046,"owners_count":20369911,"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":["actions","github","github-actions","projects"],"created_at":"2024-10-09T21:17:28.222Z","updated_at":"2025-03-18T12:31:24.912Z","avatar_url":"https://github.com/austenstone.png","language":"TypeScript","readme":"\n\u003e **Note**\n\u003e Use the official action [Add To GitHub projects](https://github.com/marketplace/actions/add-to-github-projects).\n\n---\n\n\u003e **Warning**\n\u003e We deprecated the ProjectNext GraphQL API on 2022-06-20, and **we will remove the ProjectNext GraphQL API on 2022-10-01**. For more information on migrating to the new ProjectV2 GraphQL API, please see \"The new GitHub Issues – June 23rd update\" in the GitHub Blog. See [Using the API to manage Projects\n](https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects).\n\n# Add Issue/PR to Project (BETA) ➕\n\nThis GitHub [action](https://docs.github.com/en/actions) adds issues or pull requests to a [Project (beta)](https://github.com/features/issues).\n\n## Usage\nCreate a workflow (eg: `.github/workflows/on-issue-pr-open.yml`). See [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).\n\nYou will need a project number for input `project-number`. For example [`https://github.com/users/austenstone/projects/`*`5`*](https://github.com/users/austenstone/projects/5) the project number is *`5`*.\n\nYou will need to [create a PAT(Personal Access Token)](https://github.com/settings/tokens/new?scopes=admin:org) that has `admin:org` access so we can read/write to the project. \n\nFor user owned projects the PAT will also need to have `repo` and `project` scopes. \n\nAdd this PAT as a secret so we can use it as input `github-token`, see [Creating encrypted secrets for a repository](https://docs.github.com/en/enterprise-cloud@latest/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository).\n\n### Organizations\n\nIf your project is part of an organization that has SAML enabled you must authorize the PAT, see [Authorizing a personal access token for use with SAML single sign-on](https://docs.github.com/en/enterprise-cloud@latest/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).\n\n#### Example: Add Issues and PRs\n```yml\nname: \"Add to Project\"\non:\n  issues:\n    types: [opened]\n  pull_request:\n    types: [opened]\n\njobs:\n  add_to_project:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: austenstone/project-add@main\n        with:\n          github-token: \"${{ secrets.MY_TOKEN }}\"\n          project-number: 1234\n```\n\n### Users\n\nFor user owned projects you must provide the `user` input in the workflow.\n\n```yml\n        with:\n          user: ${{ github.repository_owner }}\n          github-token: \"${{ secrets.MY_TOKEN }}\"\n          project-number: 1234\n```\n\n### Add Only Issues or Only PRs\nModify the on event to be [`issues`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issues) or [`pull_request`](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request) or both. All activity types work.\n```yml\non:\n  issues:\n    types: [opened]\n```\n#### Example: Add Issues Assigned to User\n```yml\non:\n  issues:\n    types: [assigned]\n\njobs:\n  add_assigned_to_project:\n    runs-on: ubuntu-latest\n    name: Add issue to project (beta)\n    steps:\n    - name: \"Add issue that have been assigned to austenstone to project board\"\n      uses: austenstone/project-add@v1\n      if: contains(github.event.issue.assignees.*.login, 'austenstone')\n      with:\n        github-token: ${{ secrets.MY_TOKEN }}\n        project-number: 5\n```\n\n## Input Settings\nVarious inputs are defined in [`action.yml`](action.yml):\n\n| Name | Description | Default |\n| --- | - | - |\n| **project-number** | The project number. Get this from the URL. | N/A |\n| github-token | Token to use to authorize. This should be a personal access token. | ${{\u0026nbsp;github.token\u0026nbsp;}} |\n| organization | The organization that owns of the project. | _the repository owner_\n| user | The user that owns of the project. | N/A\n\nIf you are using a user owned project board you must provide the `user` input.\u003cbr\u003e`${{ github.repository_owner }}` is fine if you're the owner of the repository.\n\n## Permissions\nUntil GitHub supports permissions for projects (beta) we will need to [create a PAT(Personal Access Token)](https://github.com/settings/tokens/new?scopes=admin:org) with `admin:org` scope.\n\nOnce support is added you we can utilize [Assigning permissions to jobs](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs) and the action will default to the token `${{ github.token }}`.\n\n```yml\npermissions:\n  repository-projects: write\n```\n\nAnother option is to use something like [tibdex/github-app-token](https://github.com/tibdex/github-app-token) to get a token during the workflow.\n\n## References\n- [Automating projects (beta)](https://docs.github.com/en/enterprise-cloud@latest/issues/trying-out-the-new-projects-experience/automating-projects)\n- [Example workflow authenticating with a GitHub App](https://docs.github.com/en/enterprise-cloud@latest/issues/trying-out-the-new-projects-experience/automating-projects#example-workflow-authenticating-with-a-github-app)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustenstone%2Fproject-add","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustenstone%2Fproject-add","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustenstone%2Fproject-add/lists"}