{"id":20972445,"url":"https://github.com/nikolvs/payload-storage-github","last_synced_at":"2025-04-23T05:09:49.931Z","repository":{"id":262534188,"uuid":"887320325","full_name":"nikolvs/payload-storage-github","owner":"nikolvs","description":"Payload storage adapter for GitHub","archived":false,"fork":false,"pushed_at":"2024-12-03T06:13:44.000Z","size":325,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T05:09:43.302Z","etag":null,"topics":["payload-plugin"],"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/nikolvs.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T14:41:35.000Z","updated_at":"2025-04-03T20:30:58.000Z","dependencies_parsed_at":"2024-12-03T10:15:10.728Z","dependency_job_id":null,"html_url":"https://github.com/nikolvs/payload-storage-github","commit_stats":null,"previous_names":["nikolvs/payload-storage-github"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fpayload-storage-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fpayload-storage-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fpayload-storage-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolvs%2Fpayload-storage-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikolvs","download_url":"https://codeload.github.com/nikolvs/payload-storage-github/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250372928,"owners_count":21419722,"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":["payload-plugin"],"created_at":"2024-11-19T04:08:12.717Z","updated_at":"2025-04-23T05:09:49.898Z","avatar_url":"https://github.com/nikolvs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Storage for Payload\n\nThis package provides a way to use the [GitHub REST API](https://docs.github.com/en/rest) to store files with Payload.\n\n## Installation\n\n```sh\npnpm add payload-storage-github\n```\n\n## Usage\n\n- Configure the `collections` object to specify which collections should use the GitHub Storage adapter. The slug _must_ match one of your existing collection slugs.\n- When enabled, this package will automatically set `disableLocalStorage` to `true` for each collection.\n\n```ts\nimport { githubStorage } from 'payload-github-storage'\nimport { Media } from './collections/Media'\nimport { MediaWithPrefix } from './collections/MediaWithPrefix'\n\nexport default buildConfig({\n  collections: [Media, MediaWithPrefix],\n  plugins: [\n    githubStorage({\n      collections: {\n        [mediaSlug]: true,\n        [mediaWithPrefixSlug]: {\n          prefix: '/media',\n        },\n      },\n\n      owner: process.env.GITHUB_REPOSITORY_OWNER,\n      repo: process.env.GITHUB_REPOSITORY_NAME,\n      branch: process.env.GITHUB_REPOSITORY_BRANCH,\n\n      options: {\n        auth: process.env.GITHUB_ACCESS_TOKEN,\n      },\n    }),\n  ],\n})\n```\n\n### Configuration Options\n\n| Option        | Description                                                                                         | Default   |\n| ------------- | --------------------------------------------------------------------------------------------------- | --------- |\n| `enabled`     | Whether or not to enable the plugin                                                                 | `true`    |\n| `collections` | Collections to apply the storage to                                                                 |           |\n| `owner`       | The name of the repository owner (GitHub username or organization)                                  |           |\n| `repo`        | The repository name                                                                                 |           |\n| `branch`      | Which branch to upload/read files                                                                   | `\"main\"`  |\n| `options`     | Octokit client configuration. See [Docs](https://github.com/octokit/octokit.js)                     |           |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolvs%2Fpayload-storage-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolvs%2Fpayload-storage-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolvs%2Fpayload-storage-github/lists"}