{"id":20056820,"url":"https://github.com/100automations/gha-add-issue-to-project","last_synced_at":"2026-06-08T06:32:17.890Z","repository":{"id":44597681,"uuid":"436353836","full_name":"100Automations/GHA-add-issue-to-project","owner":"100Automations","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-01T22:25:08.000Z","size":392,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T09:32:59.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/100Automations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2021-12-08T18:35:34.000Z","updated_at":"2022-01-14T01:22:34.000Z","dependencies_parsed_at":"2022-09-05T07:51:44.723Z","dependency_job_id":null,"html_url":"https://github.com/100Automations/GHA-add-issue-to-project","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/100Automations/GHA-add-issue-to-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100Automations%2FGHA-add-issue-to-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100Automations%2FGHA-add-issue-to-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100Automations%2FGHA-add-issue-to-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100Automations%2FGHA-add-issue-to-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/100Automations","download_url":"https://codeload.github.com/100Automations/GHA-add-issue-to-project/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/100Automations%2FGHA-add-issue-to-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34051768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-13T12:56:41.719Z","updated_at":"2026-06-08T06:32:17.858Z","avatar_url":"https://github.com/100Automations.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GHA Add Issue to Project\n\nIf your team uses GitHub project boards to manage your repository's issues, making sure that all issues end up on the right board is crucial. If an issue is not moved into the project board, or worse, moved into the wrong project board or wrong column, development and work on a project is stalled. By automatically placing newly created issues into an appropriate place, errors are lessened, and project workflow can be focused less on organizing the project, and more on delivering a product.\n\nThis GitHub Action (GHA), when triggered, is designed to move issues to a specific column based on certain set of criteria such as a specific label, or specific phrase in the issue's body. This will prove helpful for members of a team who manages a project, such as project managers. By design, it abstracts a lot of the configuration into one file, making customization simple for team members who are not adept to coding syntax.\n\n## Quickstart\n\n### Automation triggers\n\nWhile there are many [GHA triggers](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows), this automation relies on an issue-based GitHub object to function correctly. Therefore setting any trigger unrelated to issues in your workflow file, _will_ cause this GHA to return an error. Triggers that work with this GHA are:\n\n\n- issue comment created\n- issue comment edited\n- issue comment deleted\n- issue opened\n- issue edited\n- issue deleted\n- issue transferred\n- issue pinned\n- issue unpinned\n- issue closed\n- issue reopened\n- issue assigned\n- issue unassigned\n- issue labeled\n- issue unlabeled\n- issue locked\n- issue unlocked\n- issue milestoned\n- issue demilestoned\n\n### Inputs\n\n#### `config-file` (Required)\n\nA path to a JSON file containing an Array of configurations. Example: '.github/workflows/folders/config.json'\n\n#### `myToken` (Required)\n\nA valid API token scoped to post comments on the repo.\n\n#### `default-column` (Optional)\n\nThe column ID where every issue will go. Leave blank to have an issue not be moved if none of the configurations are met. Example: '123456'. To locate the ID for a specific column, refer to [this section](https://github.com/100Automations/GHA-add-issue-to-project/blob/master/README.md#how-do-i-find-a-column-id).\n\n### Outputs\n\nThe GHA does not output any data. If it works as expected, it will simply return 0, otherwise it will return an error. A quick way to verify it would be to open a test issue.\n\n## Example usage\n\n```yml\nname: Issue Trigger\non:\n  issues:\n    types: [opened]\n\njobs:\n  Sort-Opened-Issue-Into-Columns:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checking out repo\n        uses: actions/checkout@v3\n      - name: Move Issue\n        uses: 100Automations/GHA-add-issue-to-project@v0.0.1-alpha\n        with:\n          # required\n          config-file: './.github/workflows/moveIssues/config.json'\n          myToken: ${{ secrets.GITHUB_TOKEN }}\n          # optional\n          default-column: \u003cReplace this with your default column number\u003e\n```\n\n## Anatomy of the JSON configuration file\n\n```JSON\n[\n  {\n    \"body\": \"'### Dependency'/'### Dependencies'\",\n    \"labels\": \"'enhancement', !'documentation'\",\n    \"column\": 11223344\n  },\n  {\n    \"body\": \"'Research and Development'\",\n    \"labels\": \"('Known Bug', dependency) or (enhancement and invalid)\",\n    \"column\": 55667788\n  },\n]\n```\n*\u003cp style=\"text-align: center;\"\u003eAn example of a configuration JSON file with 2 configurations. The key-value pairs within each configuration represents a criteria that must be fulfilled before the issue can be moved to the specified column.\u003c/p\u003e*\n\nThe key to using this GHA is through the configuration file, which is an `Array` of key-value `Objects`, which we will call *configuration*. Each *configuration* consists of a `column` key, and various other keys we will call *criteria*. These *criteria* are a set of conditions that must be fulfilled in order for the issue that triggered this GHA to move to the column specified by the `column` key. To understand more about how to understand each *criteria*, please read the [Criteria Wording](#criteria-wording) section.\n\nOutlined here are the possible *criteria*.\n\n| Criteria Keys    | Description |\n| ---------------- | ----------- |\n| body             | Criteria for the body of the issue |\n| labels           | Criteria for the labels of the issue |\n\n\n## Criteria Wording\n\n*Criteria* are defined by string that contains a bit of logic. This *logic string*, if you will, uses `and`, `or`, and `not` key words to convey user intent. For example, the *criteria*, `body: \"dependency or dependencies\"`, means that the *criteria* is met if the issue contains 'dependency' or 'dependencies' anywhere in its body. Likewise the *criteria*, `labels: \"'enhancement' and not 'documentation'\"`, means that the *criteria* is met if the issue contains an 'enhancement' label but not a 'documentation' label.\n\nIn addition to `and`, `or`, and `not`, the *logic string* interpreter will also accept `,`, `/`, and `!`, respectively, as shorthand. Also, for more complex criteria matching, the interpreter will accept `(), [] or {}` to control the order of interpretation.\n\nWhen wording a *criteria*, it is very important to get the syntax correctly. Here are some tips to make sure that you are getting the exact wording you want.\n\n- *Criterias* are case-sensitive. For instance, if it checks for 'dependency' in the body, only 'dependency' and not 'Dependency' in the body will pass the *criteria*\n- Whitespaces is significant in separating syntax from strings. If a string you want to match contain spaces, such as 'Known Bug', it is recommended to wrap it in quotes within the *logic string*. For example, the *criteria* `body: \"Known Bug and Dependency\"` will cause an error, but `body: \"'Known Bug' and 'Dependency'\"` will not.\n- *Configurations* are verified in order. This means that if an issue passes two configurations, this issue will ultimately go to is the column that comes first in the `config-file`.\n\n## Why do we use a logic interpreter?\n\nThe interpreter is created as an easy and simple way for team members who have little to no coding knowledge to configure the GitHub Action to meet their project needs. In future iterations, the `config-file` will accept regex matching.\n\n\n## How do I find a column ID?\n\nThe easiest way would be to check the column link. This link can be found under `Copy column link` by clicking the `...` button on a column.\n\n\u003cimage src='./assets/column-link-example.png' width=\"600\" height=\"400\" /\u003e\n\nThis will give you a link like so:\n\n`https://github.com/octocat/GHA-add-issue-to-project/projects/1#column-11223344`\n\nIn this example, the digits after `column-` (11223344) is the column ID.\n\n## I've never done a GitHub Action before. What's a quick way to get this etup?\n\n1. See [this quick tutorial](https://docs.github.com/en/actions/quickstart) to get situated with GitHub Actions. It should take about 10 minutes or less.\n2. Copy and paste the code from [example usage](https://github.com/100Automations/GHA-add-issue-to-project#example-usage) into a .yml file in `.github/workflows`.\n3. In `.github/workflows`, create a folder called `moveIssues`.\n4. Inside of `moveIssues` create a file called `config.json`.\n5. Create your desired configuration, using the [example](https://github.com/100Automations/GHA-add-issue-to-project#anatomy-of-the-json-configuration-file) as a guide.\n\nWith this, all newly opened issues should move to either the columns specified in your config file, or to the default column specified in your GitHub Action.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100automations%2Fgha-add-issue-to-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F100automations%2Fgha-add-issue-to-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F100automations%2Fgha-add-issue-to-project/lists"}