{"id":20224876,"url":"https://github.com/githubocto/github-archive-action","last_synced_at":"2025-04-10T16:43:17.192Z","repository":{"id":37454271,"uuid":"355264834","full_name":"githubocto/github-archive-action","owner":"githubocto","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-21T19:23:44.000Z","size":2706,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-08T17:21:45.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/githubocto.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}},"created_at":"2021-04-06T16:52:29.000Z","updated_at":"2023-10-25T06:35:33.000Z","dependencies_parsed_at":"2023-01-04T12:15:04.457Z","dependency_job_id":null,"html_url":"https://github.com/githubocto/github-archive-action","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":"0.33333333333333337","last_synced_commit":"2cb1d643654e5cfcd4dbb3a74d8e6e47b285ec59"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgithub-archive-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgithub-archive-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgithub-archive-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/githubocto%2Fgithub-archive-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/githubocto","download_url":"https://codeload.github.com/githubocto/github-archive-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252735,"owners_count":21072703,"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-11-14T07:09:37.020Z","updated_at":"2025-04-10T16:43:17.172Z","avatar_url":"https://github.com/githubocto.png","language":"TypeScript","readme":"# Archive your GitHub data\n\nThis action archives GitHub-specific data into your repository.\n\nGitHub has data that is not represented in git — like Issues and PRs. The purpose of this action is to capture that data in a portable, usable fashion.\n\n### How does it work?\n\nThis action is triggered whenever GitHub data changes — for example, when issues are created or edited. It **does not** capture data that is already represented in your git repo, like commits.\n\nThis action is triggered whenever changes are made to GitHub data. See below for a list of events which trigger this action.\n\nThe event payload JSON is written into a SQLite database that is stored on an orphan branch called `github-meta`. Because these commits are made to an orphan branch, they won't get in the way of your day-to-day usage of git.\n\nA clone of the repository will include the `github-meta` branch, making it easy to build tooling that uses that data.\n\n## Setup\n\nClone your repo, and then create/push the orphan branch:\n\n```bash\n# in your repo:\n\n# create the orphan branch\n$ git checkout --orphan github-meta\n\n# Remove all your repo content from the orphan branch.\n# Don't worry — this only affects the orphan branches. Your content is safe!\n$ git rm -rf .\n$ git commit --allow-empty -m \"Creating github-meta branch\"\n\n# and push it up to github\n$ git push origin github-meta\n```\n\nNext, setup the action! Copy the following into `.github/workflows/archive.yaml`:\n\n```yaml\nname: GitHub Archive\n\non:\n  create:\n  delete:\n  push:\n  fork:\n  gollum:\n  issues:\n  issue_comment:\n  label:\n  milestone:\n  page_build:\n  project:\n  project_card:\n  project_column:\n  public:\n  pull_request:\n  pull_request_review:\n  pull_request_review_comment:\n  registry_package:\n  release:\n  status:\n  watch:\n\njobs:\n  archive:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Check out repo\n        uses: actions/checkout@v2\n        with:\n          ref: 'github-meta'\n      - name: Archive event\n        uses: githubocto/github-archive-action@v1\n```\n\nThis workflow definition is triggered for almost all of the [webhook event types that GitHub supports](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#webhook-events). Notably, `workflow_run` is excluded as it would capture runs of this archiving action.\n\nIf you don't care about a given kind of event, you can remove that from the list of triggers in the `on:` block of your workflow file.\n\n## How is the data serialized?\n\nThe data is written to a [SQLite](https://www.sqlite.org/) database named `github-archive.sqlite` in the `github-meta` branch. It contains one table, `events`, with the following schema:\n\n```sql\nCREATE TABLE events (\n    id TEXT PRIMARY KEY,\n    timestamp TEXT NOT NULL,\n    kind TEXT NOT NULL,\n    event TEXT NOT NULL\n);\n```\n\n| Column    | Description                                                                                                                                                                                      |\n| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| id        | A globally-unique ID for the captured event record.                                                                                                                                              |\n| timestamp | An timestamp indicating when the event was captured, in [simplified extended ISO-8601 format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) |\n| kind      | The name of the [webhook event type](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#webhook-events) which triggered the action, like `issues` or `pull_request`      |\n| event     | The JSON payload data for the event                                                                                                                                                              |\n\nSee the [webhook events documentation](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#webhook-events) to find links to example payloads for each event.\n\n# License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubocto%2Fgithub-archive-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithubocto%2Fgithub-archive-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithubocto%2Fgithub-archive-action/lists"}