{"id":19383728,"url":"https://github.com/jill64/octoflare","last_synced_at":"2025-07-13T17:09:40.849Z","repository":{"id":198783629,"uuid":"701545250","full_name":"jill64/octoflare","owner":"jill64","description":"🌤️ A framework for building GitHub Apps with Cloudflare Worker","archived":false,"fork":false,"pushed_at":"2025-04-14T23:32:42.000Z","size":3260,"stargazers_count":7,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-15T00:29:08.224Z","etag":null,"topics":["actions","cloudflare","framework","github","worker"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/octoflare","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/jill64.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,"zenodo":null}},"created_at":"2023-10-06T21:59:22.000Z","updated_at":"2025-04-14T23:32:09.000Z","dependencies_parsed_at":"2023-10-17T08:21:44.596Z","dependency_job_id":"5621c6a4-989e-44e7-81ce-2d895b798b86","html_url":"https://github.com/jill64/octoflare","commit_stats":{"total_commits":1739,"total_committers":9,"mean_commits":"193.22222222222223","dds":0.4577343300747556,"last_synced_commit":"55768f6c039c19bf80959bcf2b2d09425c51042f"},"previous_names":["jill64/octoflare"],"tags_count":184,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Foctoflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Foctoflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Foctoflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jill64%2Foctoflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jill64","download_url":"https://codeload.github.com/jill64/octoflare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250517961,"owners_count":21443865,"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","cloudflare","framework","github","worker"],"created_at":"2024-11-10T09:27:28.114Z","updated_at":"2025-04-23T21:32:00.787Z","avatar_url":"https://github.com/jill64.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!----- BEGIN GHOST DOCS HEADER -----\u003e\n\n# octoflare\n\n\n\u003c!----- BEGIN GHOST DOCS BADGES -----\u003e\n\u003ca href=\"https://github.com/jill64/octoflare/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/jill64/octoflare/actions/workflows/ci.yml/badge.svg\" alt=\"ci.yml\" /\u003e\u003c/a\u003e\n\u003c!----- END GHOST DOCS BADGES -----\u003e\n\n\n🌤️ A framework for building GitHub Apps with Cloudflare Worker\n\n\u003c!----- END GHOST DOCS HEADER -----\u003e\n\n[Example Apps](https://github.com/jill64?tab=repositories\u0026q=github-app\u0026type=\u0026language=\u0026sort=stargazers)\n\n![workflow](./docs/workflow.png)\n\n## Start New Project with CLI\n\n```sh\nnpm create octoflare\n```\n\n## Setup\n\nThe following must be set as environment variables for Cloudflare Workers\n\n| Key                         | Value                                            | Recommend Encryption | Auto Set by CLI |\n| --------------------------- | ------------------------------------------------ | -------------------- | --------------- |\n| OCTOFLARE_APP_ID            | GitHub App ID                                    |                      |                 |\n| OCTOFLARE_PRIVATE_KEY_PKCS8 | GitHub App private key converted to PKCS8 format | ✔︎                  |                 |\n| OCTOFLARE_WEBHOOK_SECRET    | GitHub App Webhook Secret                        | ✔︎                  |                 |\n| OCTOFLARE_APP_REPO          | GitHub App Repository Name                       |                      | ✔︎             |\n| OCTOFLARE_APP_OWNER         | GitHub App Repository Owner Name                 |                      | ✔︎             |\n\n## Convert Privatekey\n\nBefore using the private key provided by GitHub, you need to convert it to PKCS8 format with the command below.\n\n```sh\nopenssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.key\n```\n\nor Using [Web Tool](https://decoder.link/rsa_converter)\n\n## Commands\n\n| npm script             | Description                        |\n| ---------------------- | ---------------------------------- |\n| `npm run lint`         | Lint                               |\n| `npm run format`       | Format by Prettier                 |\n| `npm run build`        | Build worker script                |\n| `npm run deploy`       | Deploy worker script to cloudflare |\n| `npm run build:action` | Build GitHub javascript action     |\n\n## Example\n\n### Worker\n\n```js\n// src/index.js\nimport { octoflare } from 'octoflare'\n\nexport default octoflare(\n  async ({ request, env, app, payload, installation }) =\u003e {\n    // Application Code\n\n    // Create Status Check for Target SHA\n    const { dispatchWorkflow } = await installation.createCheckRun({\n      repo: 'repository-name',\n      owner: 'repository-owner',\n      name: 'workflow-name',\n      head_sha: 'target-sha'\n    })\n\n    await dispatchWorkflow({\n      // ...\n    })\n\n    return new Response('Workflow Dispatched', {\n      status: 200\n    })\n  }\n)\n```\n\n[Handler Type Definition](./packages/octoflare/src/types/OctoflareHandler.ts)\n\n### Action\n\n```js\n// action/src/index.js\nimport { action } from 'octoflare'\n\naction(({ request, env, app, payload }) =\u003e {\n  // Application Code\n\n  // Return Checks Status\n  return {\n    conclusion: 'success',\n    output: {\n      title: 'Check Success',\n      summary: 'The check conclude as success'\n    }\n  }\n})\n```\n\n\u003c!----- BEGIN GHOST DOCS FOOTER -----\u003e\n\n## License\n\n[MIT](LICENSE)\n\n\u003c!----- END GHOST DOCS FOOTER -----\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjill64%2Foctoflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjill64%2Foctoflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjill64%2Foctoflare/lists"}