{"id":15465267,"url":"https://github.com/gr2m/github-project","last_synced_at":"2025-04-22T23:48:18.660Z","repository":{"id":37957464,"uuid":"435786293","full_name":"gr2m/github-project","owner":"gr2m","description":"JavaScript SDK for GitHub's new Projects","archived":false,"fork":false,"pushed_at":"2025-04-16T04:05:04.000Z","size":1233,"stargazers_count":37,"open_issues_count":15,"forks_count":10,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-17T02:49:57.368Z","etag":null,"topics":["api","github","github-projects","project-next","projectnext","projects","sdk"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"gr2m"}},"created_at":"2021-12-07T07:38:24.000Z","updated_at":"2025-04-16T04:05:07.000Z","dependencies_parsed_at":"2023-11-08T14:01:59.427Z","dependency_job_id":"0ea5d4b8-47b6-4213-8284-7fbe7ddd89db","html_url":"https://github.com/gr2m/github-project","commit_stats":{"total_commits":121,"total_committers":9,"mean_commits":"13.444444444444445","dds":0.5867768595041323,"last_synced_commit":"89b28d282981ae97eeb3591e903176295fb374f8"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Fgithub-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/github-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249995625,"owners_count":21357960,"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":["api","github","github-projects","project-next","projectnext","projects","sdk"],"created_at":"2024-10-02T01:00:41.597Z","updated_at":"2025-04-22T23:48:18.640Z","avatar_url":"https://github.com/gr2m.png","language":"JavaScript","readme":"# github-project\n\n\u003e JavaScript SDK for GitHub's new Projects\n\n[![Test](https://github.com/gr2m/github-project/actions/workflows/test.yml/badge.svg)](https://github.com/gr2m/github-project/actions/workflows/test.yml)\n\n## Features\n\n- Use [GitHub Projects (beta)](https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects) as a database of issues and pull requests with custom fields.\n- Simple interaction with item fields and content (draft/issue/pull request) properties.\n- Look up items by issue/pull request node IDs or number and repository name.\n- 100% test coverage and type definitions.\n\n## Usage\n\n\u003ctable\u003e\n\u003ctbody valign=top align=left\u003e\n\u003ctr\u003e\u003cth\u003e\nBrowsers\n\u003c/th\u003e\u003ctd width=100%\u003e\nLoad \u003ccode\u003egithub-project\u003c/code\u003e directly from \u003ca href=\"https://cdn.skypack.dev\"\u003ecdn.skypack.dev\u003c/a\u003e\n\n```html\n\u003cscript type=\"module\"\u003e\n  import GitHubProject from \"https://cdn.skypack.dev/github-project\";\n\u003c/script\u003e\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth\u003e\nNode\n\u003c/th\u003e\u003ctd\u003e\n\nInstall with \u003ccode\u003enpm install github-project\u003c/code\u003e\n\n```js\nimport GitHubProject from \"github-project\";\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nA project always belongs to a user or organization account and has a number. For authentication you can pass [a personal access token with `project` and `write:org` scopes](https://github.com/settings/tokens/new?scopes=write:org,project\u0026description=github-project). For read-only access the `read:org` and `read:project` scopes are sufficient.\n\n`fields` is map of internal field names to the project's column labels. The comparison is case-insensitive. `\"Priority\"` will match both a field with the label `\"Priority\"` and one with the label `\"priority\"`. An error will be thrown if a project field isn't found, unless the field is set to `optional: true`.\n\n```js\nconst options = {\n  owner: \"my-org\",\n  number: 1,\n  token: \"ghp_s3cR3t\",\n  fields: {\n    priority: \"Priority\",\n    dueAt: \"Due\",\n    lastUpdate: { name: \"Last Update\", optional: true },\n  },\n};\n\nconst project = new GitHubProject(options);\n\n// Alternatively, you can call the factory method to get a project instance\n// const project = await GithubProject.getInstance(options)\n\n// get project data\nconst projectData = await project.get();\nconsole.log(projectData.description);\n\n// log out all items\nconst items = await project.items.list();\nfor (const item of items) {\n  // every item has a `.fields` property for the custom fields\n  // and an `.content` property which is set unless the item is a draft\n  console.log(\n    \"%s is due on %s (Priority: %d, Assignees: %j)\",\n    item.fields.title,\n    item.fields.dueAt,\n    item.fields.priority,\n    item.type === \"REDACTED\"\n      ? \"_redacted_\"\n      : item.content.assignees.map(({ login }) =\u003e login).join(\",\"),\n  );\n}\n\n// add a new item using an existing issue\n// You would usually retrieve the issue node ID from an event payload, such as `event.issue.node_id`\nconst newItem = await project.items.add(issue.node_id, { priority: 1 });\n\n// retrieve a single item using the issue node ID (passing item node ID as string works, too)\nconst item = await project.items.getByContentId(issue.node_id);\n\n// item is undefined when not found\nif (item) {\n  // update an item\n  const updatedItem = await project.items.update(item.id, { priority: 2 });\n\n  // remove item\n  await project.items.remove(item.id);\n}\n```\n\n## API\n\n### Constructor\n\n```js\nconst project = new GitHubProject(options);\n```\n\n### Factory method\n\nThe factory method is useful when you want immediate access to the project's data, for example to get the project's title. Will throw an error if the project doesn't exist.\n\n```js\nconst project = GitHubProject.getInstance(options);\n```\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.owner\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The account name of the GitHub organization.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.number\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eNumber\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. Project number as you see it in the URL of the project.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.token\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eString\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required unless `options.octokit` is set**. When set to a personal access token or an OAuth token, the `read:org` scope is required for read-only access, and the `write:org` scope is required for read-write access. When set to an installation access token, the `organization_projects:read` permission is required for read-only access, and the `organization_projects:write` permission is required for read-write access.\n\n\u003c/td\u003e\u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.octokit\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eOctokit\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required unless `options.token` is set**. You can pass an [`@octokit/core`](https://github.com/octokit/core.js/#readme) instance, or an instance of any `Octokit` class that is built upon it, such as [`octokit`](https://github.com/octokit/octokit.js/#readme).\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.fields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eObject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. A map of internal names for fields to the column names or field option objects. The `title` key will always be set to `\"Title\"` and `status` to `\"Status\"` to account for the built-in fields. The other built-in columns `Assignees`, `Labels`, `Linked Pull Requests`, `Milestone`, `Repository`, and `Reviewers` cannot be set through the project and are not considered fields. You have to set them on the issue or pull request, and you can access them by `item.content.assignees`, `item.content.labels` etc (for both issues and pull requests).\n\nA field option object must include a `name` key and can include an `optional` key.\n\nWhen `optional` is `false` or omitted, an error will be thrown if the field is not found in the project. When `optional` is `true`, the error will be replaced by an `info` log via the [Octokit Logger](https://octokit.github.io/rest.js/v18#logging). Optional fields that don't exist in the project are not set on items returned by the `project.items.*` methods.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.matchFieldName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eFunction\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nCustomize how field names are matched with the values provided in `options.fields`. The function accepts two arguments:\n\n1. `projectFieldName`\n2. `userFieldName`\n\nBoth are strings. Both arguments are lower-cased and trimmed before passed to the function. The function must return `true` or `false`.\n\nDefaults to\n\n```js\nfunction (projectFieldName, userFieldName) {\n  return projectFieldName === userFieldName\n}\n```\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.matchFieldOptionValue\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eFunction\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nCustomize how field options are matched with the field values set in `project.items.add()`, `project.items.addDraft()`, or `project.items.update*()` methods. The function accepts two arguments:\n\n1. `fieldOptionValue`\n2. `userValue`\n\nBoth are strings. Both arguments are trimmed before passed to the function. The function must return `true` or `false`.\n\nDefaults to\n\n```js\nfunction (fieldOptionValue, userValue) {\n  return fieldOptionValue === userValue\n}\n```\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eoptions.truncate\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eFunction\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nText field values cannot exceed 1024 characters. By default, the `options.truncate` just returns text as is. We recommend to use an establish truncate function such as [loadsh's `_.truncate()`](https://lodash.com/docs/4.17.15#truncate), as byte size is not the same as text length.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.getProperties()`\n\n```js\nconst projectData = await project.getProperties();\n```\n\nReturns project level data `url`, `title`, `description` and `databaseId`\n\n### `project.items.list()`\n\n```js\nconst items = await project.items.list();\n```\n\nReturns all items in the project.\n\n### `project.items.addDraft()`\n\n```js\nconst newItem = await project.items.addDraft(content /*, fields*/);\n```\n\nAdds a new draft issue item to the project, sets the fields if any were passed, and returns the new item.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtent.title\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The title of the issue draft.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtent.body\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe body of the issue draft.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtent.assigneeIds\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring[]\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nNode IDs of user accounts the issue should be assigned to when created.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003efields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nMap of internal field names to their values.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.add()`\n\n```js\nconst newItem = await project.items.add(contentId /*, fields*/);\n```\n\nAdds a new item to the project, sets the fields if any were passed, and returns the new item. If the item already exists then it's a no-op, the existing item is still updated with the passed fields if any were passed.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtentId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the issue or pull request you want to add.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003efields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nMap of internal field names to their values.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.get()`\n\n```js\nconst item = await project.items.get(itemNodeId);\n```\n\nRetrieve a single item based on its issue or pull request node ID.\nResolves with `undefined` if item cannot be found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eitemNodeId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the project item\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.getByContentId()`\n\n```js\nconst item = await project.items.getByContentId(contentId);\n```\n\nRetrieve a single item based on its issue or pull request node ID.\nResolves with `undefined` if item cannot be found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtentId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the issue/pull request the item is linked to.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.getByContentRepositoryAndNumber()`\n\n```js\nconst item = await project.items.getByContentRepositoryAndNumber(\n  repositoryName,\n  issueOrPullRequestNumber,\n);\n```\n\nRetrieve a single item based on its issue or pull request node ID.\nResolves with `undefined` if item cannot be found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003erepositoryName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The repository name, without the `owner/`.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eissueOrPullRequestNumber\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003enumber\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The number of the issue or pull request.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.update()`\n\n```js\nconst updatedItem = await project.items.update(itemNodeId, fields);\n```\n\nUpdate an exist item. To unset a field, set it to `null`.\nReturns undefined if item cannot be found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eitemNodeId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the project item\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003efields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nMap of internal field names to their values.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.updateByContentId()`\n\n```js\nconst updatedItem = await project.items.updateByContentId(contentId, fields);\n```\n\nUpdate an exist item based on the node ID of its linked issue or pull request. To unset a field, set it to `null`.\nReturns undefined if item cannot be found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtentId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the issue/pull request the item is linked to.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003efields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nMap of internal field names to their values.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.updateByContentRepositoryAndNumber()`\n\n```js\nconst updatedItem = await project.items.updateByContentRepositoryAndNumber(\n  repositoryName,\n  issueOrPullRequestNumber\n  fields\n);\n```\n\nUpdate an exist item based on the node ID of its linked issue or pull request. To unset a field, set it to `null`.\nReturns undefined if item cannot be found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003erepositoryName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The repository name, without the `owner/`.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eissueOrPullRequestNumber\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003enumber\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The number of the issue or pull request.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003efields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nMap of internal field names to their values.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.archive()`\n\n```js\nawait project.items.archive(itemNodeId);\n```\n\nArchives a single item. Resolves with the archived item or with `undefined` if item was not found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eitemNodeId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the project item\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.archiveByContentId()`\n\n```js\nawait project.items.archiveByContentId(contentId);\n```\n\nArchives a single item based on the Node ID of its linked issue or pull request. Resolves with the archived item or with `undefined` if item was not found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtentId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the issue/pull request the item is linked to.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.archiveByContentRepositoryAndNumber()`\n\n```js\nawait project.items.archiveByContentRepositoryAndNumber(\n  repositoryName,\n  issueOrPullRequestNumber,\n);\n```\n\nArchives a single item based on the Node ID of its linked issue or pull request. Resolves with the archived item or with `undefined` if item was not found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003erepositoryName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The repository name, without the `owner/`.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eissueOrPullRequestNumber\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003enumber\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The number of the issue or pull request.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.remove()`\n\n```js\nawait project.items.remove(itemNodeId);\n```\n\nRemoves a single item. Resolves with the removed item or with `undefined` if item was not found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eitemNodeId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the project item\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.removeByContentId()`\n\n```js\nawait project.items.removeByContentId(contentId);\n```\n\nRemoves a single item based on the Node ID of its linked issue or pull request. Resolves with the removed item or with `undefined` if item was not found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003econtentId\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The graphql node ID of the issue/pull request the item is linked to.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### `project.items.removeByContentRepositoryAndNumber()`\n\n```js\nawait project.items.removeByContentRepositoryAndNumber(\n  repositoryName,\n  issueOrPullRequestNumber,\n);\n```\n\nRemoves a single item based on the Node ID of its linked issue or pull request. Resolves with the removed item or with `undefined` if item was not found.\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003erepositoryName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The repository name, without the `owner/`.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eissueOrPullRequestNumber\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003enumber\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n**Required**. The number of the issue or pull request.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n### Errors\n\nExpected errors are thrown using custom `Error` classes. You can check for any error thrown by `github-project` or for specific errors.\n\nCustom errors are designed in a way that `error.message` does not leak any user content. All errors do provide a `.toHumanMessage()` method if you want to provide a more helpful error message which includes both project data as well ase user-provided data.\n\n```js\nimport Project, { GitHubProjectError } from \"github-project\";\n\ntry {\n  await myScript(new Project(options));\n} catch (error) {\n  if (error instanceof GitHubProjectError) {\n    myLogger.error(\n      {\n        // .code and .details are always set on GitHubProjectError instances\n        code: error.code,\n        details: error.details,\n        // log out helpful human-readable error message, but beware that it likely contains user content\n      },\n      error.toHumanMessage(),\n    );\n  } else {\n    // handle any other error\n    myLogger.error({ error }, `An unexpected error occurred`);\n  }\n\n  throw error;\n}\n```\n\n#### `GitHubProjectNotFoundError`\n\nThrown when a project cannot be found based on the `owner` and `number` passed to the `Project` constructor. The error is also thrown if the project exists but cannot be found based on authentication.\n\n```js\nimport Project, { GitHubProjectNotFoundError } from \"github-project\";\n\ntry {\n  await myScript(new Project(options));\n} catch (error) {\n  if (error instanceof GitHubProjectNotFoundError) {\n    analytics.track(\"GitHubProjectNotFoundError\", {\n      owner: error.details.owner,\n      number: error.details.number,\n    });\n\n    myLogger.error(\n      {\n        code: error.code,\n        details: error.details,\n      },\n      error.toHumanMessage(),\n    );\n  }\n\n  throw error;\n}\n```\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003ename\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eGitHubProjectNotFoundError\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003emessage\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n\u003e Project cannot be found\n\n\u003c/td\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with error details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.owner\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nLogin of owner of the project\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.number\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003enumber\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nNumber of the project\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nExample for `error.toHumanMessage()`:\n\n\u003e Project #1 could not be found for @gr2m\n\n#### `GitHubProjectUnknownFieldError`\n\nThrown when a configured field configured in the `Project` constructor cannot be found in the project.\n\n```js\nimport Project, { GitHubProjectUnknownFieldError } from \"github-project\";\n\ntry {\n  await myScript(new Project(options));\n} catch (error) {\n  if (error instanceof GitHubProjectUnknownFieldError) {\n    analytics.track(\"GitHubProjectUnknownFieldError\", {\n      projectFieldNames: error.details.projectFieldNames,\n      userFieldName: error.details.userFieldName,\n    });\n\n    myLogger.error(\n      {\n        code: error.code,\n        details: error.details,\n      },\n      error.toHumanMessage(),\n    );\n  }\n\n  throw error;\n}\n```\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003ename\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eGitHubProjectUnknownFieldError\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003emessage\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n\u003e Project field cannot be found\n\n\u003c/td\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with error details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.projectFieldNames\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring[]\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nNames of all project fields as shown in the project\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.userFieldName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nName of the field provided by the user\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.userFieldNameAlias\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nAlias of the field name provided by the user\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nExample for `error.toHumanMessage()`:\n\n\u003e \"NOPE\" could not be matched with any of the existing field names: \"My text\", \"My number\", \"My Date\". If the field should be considered optional, then set it to \"nope: { name: \"NOPE\", optional: true}\n\n#### `GitHubProjectInvalidValueError`\n\nThrown when attempting to set a single select project field to a value that is not included in the field's configured options.\n\n```js\nimport Project, { GitHubProjectInvalidValueError } from \"github-project\";\n\ntry {\n  await myScript(new Project(options));\n} catch (error) {\n  if (error instanceof GitHubProjectInvalidValueError) {\n    analytics.track(\"GitHubProjectInvalidValueError\", {\n      fieldName: error.details.field.name,\n      userValue: error.details.userValue,\n    });\n\n    myLogger.error(\n      {\n        code: error.code,\n        details: error.details,\n      },\n      error.toHumanMessage(),\n    );\n  }\n\n  throw error;\n}\n```\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003ename\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eGitHubProjectInvalidValueError\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003emessage\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n\u003e User value is incompatible with project field type\n\n\u003c/td\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with error details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with field details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.id\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n`details.field.id` is the project field GraphQL node ID\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.name\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe field name as shown in the project\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.type\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nIs always either `DATE`, `NUMBER`, or `SINGLE_SELECT`. If it's `SINGLE_SELECT`, then the error is a [`GitHubProjectUnknownFieldOptionError`](#githubprojectunknownfieldoptionerror).\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.userValue\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe stringified value set in the API call.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nExample for `error.toHumanMessage()`:\n\n\u003e \"unknown\" is not compatible with the \"My Date\" project field\n\n#### `GitHubProjectUnknownFieldOptionError`\n\nThrown when attempting to set a single select project field to a value that is not included in the field's configured options. Inherits from [`GitHubProjectInvalidValueError`](#githubprojectinvalidvalueerror).\n\n```js\nimport Project, { GitHubProjectUnknownFieldOptionError } from \"github-project\";\n\ntry {\n  await myScript(new Project(options));\n} catch (error) {\n  if (error instanceof GitHubProjectUnknownFieldOptionError) {\n    analytics.track(\"GitHubProjectUnknownFieldOptionError\", {\n      fieldName: error.details.field.name,\n      userValue: error.details.userValue,\n    });\n\n    myLogger.error(\n      {\n        code: error.code,\n        details: error.details,\n      },\n      error.toHumanMessage(),\n    );\n  }\n\n  throw error;\n}\n```\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003ename\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eGitHubProjectUnknownFieldOptionError\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003emessage\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n\u003e Project field option cannot be found\n\n\u003c/td\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with error details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with field details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.id\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n`details.field.id` is the project field GraphQL node ID\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.name\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe field name as shown in the project\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.type\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n`SINGLE_SELECT`\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.options\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject[]\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nArray of objects with project field details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.options[].id\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe GraphQL node ID of the option\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.field.options[].name\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe option name as shown in the project.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.userValue\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe stringified value set in the API call.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nExample for `error.toHumanMessage()`:\n\n\u003e \"unknown\" is an invalid option for \"Single select\"\n\n#### `GitHubProjectUpdateReadOnlyFieldError`\n\nThrown when attempting to set a single select project field to a value that is not included in the field's configured options.\n\n```js\nimport Project, { GitHubProjectUpdateReadOnlyFieldError } from \"github-project\";\n\ntry {\n  await myScript(new Project(options));\n} catch (error) {\n  if (error instanceof GitHubProjectUpdateReadOnlyFieldError) {\n    analytics.track(\"GitHubProjectUpdateReadOnlyFieldError\", {\n      fieldName: error.details.field.name,\n      userValue: error.details.userValue,\n    });\n\n    myLogger.error(\n      {\n        code: error.code,\n        details: error.details,\n      },\n      error.toHumanMessage(),\n    );\n  }\n\n  throw error;\n}\n```\n\n\u003ctable\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        name\n      \u003c/th\u003e\n      \u003cth\u003e\n        type\n      \u003c/th\u003e\n      \u003cth width=100%\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003ename\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\u003ccode\u003eGitHubProjectUpdateReadOnlyFieldError\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003emessage\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003econstant\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\n\u003e Project read-only field cannot be updated\n\n\u003c/td\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nObject with error details\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.fields\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003eobject[]\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nArray of objects with read-only fields and their user-provided values\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.fields[].id\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nGraphQL node ID of the project field\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.fields[].name\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe project field name\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.fields[].userName\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe user-provided alias for the project field\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003edetails.fields[].userValue\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/td\u003e\n      \u003ctd\u003e\n\nThe user provided value that the user attempted to set the field to.\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\nExample for `error.toHumanMessage()`:\n\n\u003e Cannot update read-only fields: \"Assignees\" (.assignees) to \"gr2m\", \"Labels\" (.labels) to \"bug\"\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://dev.to/gr2m\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/39992?v=4?s=100\" width=\"100px;\" alt=\"Gregor Martynus\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGregor Martynus\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-gr2m\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=gr2m\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=gr2m\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/pulls?q=is%3Apr+reviewed-by%3Agr2m\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"#maintenance-gr2m\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"#infra-gr2m\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://mikesurowiec.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/821435?v=4?s=100\" width=\"100px;\" alt=\"Mike Surowiec\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMike Surowiec\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gr2m/github-project/commits?author=mikesurowiec\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=mikesurowiec\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/tmelliottjr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/13594679?v=4?s=100\" width=\"100px;\" alt=\"Tom Elliott\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTom Elliott\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gr2m/github-project/commits?author=tmelliottjr\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=tmelliottjr\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/pulls?q=is%3Apr+reviewed-by%3Atmelliottjr\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://maxisam.github.io/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/456807?v=4?s=100\" width=\"100px;\" alt=\"Sam Lin\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSam Lin\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gr2m/github-project/commits?author=maxisam\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=maxisam\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://evan.bio\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/17055832?v=4?s=100\" width=\"100px;\" alt=\"Evan Bonsignori\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEvan Bonsignori\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gr2m/github-project/commits?author=Ebonsignori\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=Ebonsignori\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=Ebonsignori\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://www.leexi.ai/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/17877656?v=4?s=100\" width=\"100px;\" alt=\"Baptiste Lombard\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eBaptiste Lombard\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/gr2m/github-project/commits?author=blombard\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/gr2m/github-project/commits?author=blombard\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## License\n\n[ISC](LICENSE.md)\n","funding_links":["https://github.com/sponsors/gr2m"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fgithub-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Fgithub-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Fgithub-project/lists"}