{"templateId":"GuidePage","sharedDataIds":{"sidebar":"sidebar-miniapps/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"GitHub","description":"Developer API, partner integration, MCP, SDK, and customer help center.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"github","__idx":0},"children":["GitHub"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A developer platform with bearer token auth, header-based composite events, HMAC verification, 12 actions, and 20 triggers."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const githubMiniApp = {\n  ns: 'github',\n  name: 'github',\n  type: 'github',\n  title: 'GitHub',\n  label: 'GitHub',\n  description: 'Automate GitHub workflows: issues, PRs, deployments, and more.',\n  shortDescription: 'GitHub issues, PRs, CI/CD automation',\n  status: 'public',\n  version: '1.0.0',\n  category: 'developer',\n  icon: 'https://cdn.karzoun.com/miniapps/github/icon.svg',\n  logo: 'https://cdn.karzoun.com/miniapps/github/logo.svg',\n  docsUrl: 'https://docs.github.com/en/rest',\n\n  auth: {\n    type: 'bearer_token',\n    sensitiveKeys: ['accessToken', 'webhookSecret'],\n    config: { accessToken: '', webhookSecret: '' },\n    userDetails: {\n      url: 'https://api.github.com/user',\n      method: 'GET',\n      headers: {\n        Authorization: 'Bearer [[accessToken]]',\n        Accept: 'application/vnd.github+json',\n      },\n      bodyType: 'json',\n      body: {},\n      mapping: { uid: '$.id', name: '$.login' },\n    },\n  },\n\n  source: {\n    rpc_repos_list: {\n      url: 'https://api.github.com/user/repos?per_page=100&sort=updated',\n      method: 'GET',\n      headers: {\n        Authorization: 'Bearer [[accessToken]]',\n        Accept: 'application/vnd.github+json',\n      },\n      valueField: 'full_name',\n      labelField: 'full_name',\n    },\n  },\n\n  triggers: [\n    { type: 'miniapps:github', event: 'push.received', icon: 'git-branch',\n      label: 'Push Received', description: 'Code pushed to a branch', isCustom: false, img: 'automation3.svg' },\n    { type: 'miniapps:github', event: 'pull_request.opened', icon: 'git-pull-request',\n      label: 'PR Opened', description: 'Pull request opened', isCustom: false, img: 'automation3.svg' },\n    { type: 'miniapps:github', event: 'issue.opened', icon: 'ticket',\n      label: 'Issue Opened', description: 'New issue created', isCustom: false, img: 'automation3.svg' },\n    // ... more triggers\n  ],\n\n  actions: [\n    {\n      name: 'createIssue',\n      title: 'Create Issue',\n      description: 'Create a new GitHub issue',\n      renderStrategy: 'auto',\n      parameters: {\n        type: 'object',\n        required: ['repository', 'title'],\n        properties: {\n          repository: {\n            type: 'string',\n            title: 'Repository',\n            'x-source': 'rpc_repos_list',\n            'x-fallback': 'input',\n          },\n          title: { type: 'string', title: 'Title' },\n          body: { type: 'string', title: 'Description' },\n          labels: { type: 'array', title: 'Labels' },\n          assignees: { type: 'array', title: 'Assignees' },\n        },\n      },\n      requests: [{\n        url: 'https://api.github.com/repos/{{repository}}/issues',\n        method: 'POST',\n        headers: {\n          Authorization: 'Bearer [[accessToken]]',\n          Accept: 'application/vnd.github+json',\n          'Content-Type': 'application/json',\n        },\n        bodyType: 'json',\n        body: {\n          title: '{{title}}',\n          body: '{{body}}',\n          labels: '{{labels}}',\n          assignees: '{{assignees}}',\n        },\n        mapping: {\n          issueNumber: '$.number',\n          issueUrl: '$.html_url',\n          issueId: '$.id',\n        },\n      }],\n    },\n  ],\n\n  // Webhook: header + body composite event\n  webhook: {\n    eventExtraction: {\n      source: 'header',\n      path: 'X-GitHub-Event',\n      compositeStrategy: {\n        parts: [\n          { source: 'header', path: 'X-GitHub-Event' },\n          { source: 'body', path: '$.action' },\n        ],\n        separator: '.',\n      },\n    },\n    transactionId: { path: '$.delivery', fallback: 'generate' },\n    verification: {\n      type: 'hmac-sha256',\n      headerName: 'X-Hub-Signature-256',\n      secretKey: 'webhookSecret',    // Resolves from credentials (per-repo secret)\n    },\n    response: { statusCode: 200, body: { ok: true } },\n  },\n};\n","lang":"javascript"},"children":[]}]},"headings":[{"value":"GitHub","id":"github","depth":1}],"frontmatter":{"title":"GitHub example","titleTranslationKey":"sidebar.miniapps.exampleGithub","audience":"developer","status":"published","locales":["en"],"template":"GuidePage","seo":{"title":"GitHub"}},"lastModified":"2026-06-23T12:06:12.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/miniapps/examples/github","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}