{"id":13721677,"url":"https://github.com/transitive-bullshit/puppeteer-github","last_synced_at":"2025-07-05T16:38:51.390Z","repository":{"id":65371535,"uuid":"132928584","full_name":"transitive-bullshit/puppeteer-github","owner":"transitive-bullshit","description":"GitHub automation driven by headless chrome.","archived":false,"fork":false,"pushed_at":"2020-07-11T23:11:03.000Z","size":116,"stargazers_count":18,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-06T23:35:43.158Z","etag":null,"topics":["automation","github","headless-chrome","puppeteer"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transitive-bullshit.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-10T16:44:28.000Z","updated_at":"2024-10-16T22:20:17.000Z","dependencies_parsed_at":"2023-01-19T22:45:33.856Z","dependency_job_id":null,"html_url":"https://github.com/transitive-bullshit/puppeteer-github","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/transitive-bullshit/puppeteer-github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fpuppeteer-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fpuppeteer-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fpuppeteer-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fpuppeteer-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transitive-bullshit","download_url":"https://codeload.github.com/transitive-bullshit/puppeteer-github/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transitive-bullshit%2Fpuppeteer-github/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263772626,"owners_count":23509151,"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":["automation","github","headless-chrome","puppeteer"],"created_at":"2024-08-03T01:01:20.075Z","updated_at":"2025-07-05T16:38:51.370Z","avatar_url":"https://github.com/transitive-bullshit.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","包","Packages"],"sub_categories":["贡献"],"readme":"# puppeteer-github\n\n\u003e [GitHub](https://github.com) automation driven by headless chrome.\n\n[![NPM](https://img.shields.io/npm/v/puppeteer-github.svg)](https://www.npmjs.com/package/puppeteer-github) [![Build Status](https://travis-ci.com/transitive-bullshit/puppeteer-github.svg?branch=master)](https://travis-ci.com/transitive-bullshit/puppeteer-github) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\nThis module also has a [CLI](https://github.com/transitive-bullshit/puppeteer-github-cli).\n\n## Install\n\n```bash\nnpm install --save puppeteer-github\n```\n\n## Usage\n\nThis example signs into a [GitHub](https://github.com) account.\n\n```js\nconst PuppeteerGitHub = require('puppeteer-github')\n\nconst github = new PuppeteerGitHub()\n\nawait github.signin({ username: 'xxx', password: 'xxx' })\nawait github.starRepo('facebook/react')\n\nawait github.close()\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [PuppeteerGitHub](#puppeteergithub)\n    -   [isAuthenticated](#isauthenticated)\n    -   [user](#user)\n    -   [browser](#browser)\n    -   [signup](#signup)\n    -   [signin](#signin)\n    -   [signout](#signout)\n    -   [verifyEmail](#verifyemail)\n    -   [starPackage](#starpackage)\n    -   [unstarPackage](#unstarpackage)\n    -   [starRepo](#starrepo)\n    -   [unstarRepo](#unstarrepo)\n    -   [close](#close)\n\n### [PuppeteerGitHub](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L20-L199)\n\n[GitHub](https://github.com) automation driven by headless chrome.\n\nType: `function (opts)`\n\n-   `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options (optional, default `{}`)\n    -   `opts.browser` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Puppeteer browser instance to use\n    -   `opts.puppeteer` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Puppeteer [launch options](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions)\n\n* * *\n\n#### [isAuthenticated](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L32-L32)\n\nWhether or not this instance is authenticated with GitHub.\n\nType: [boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)\n\n* * *\n\n#### [user](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L39-L39)\n\nAuthenticated user if authenticated with GitHub.\n\nType: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)\n\n* * *\n\n#### [browser](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L46-L52)\n\nPuppeteer Browser instance to use.\n\nType: `function ()`\n\n* * *\n\n#### [signup](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L66-L77)\n\nAutomates the creation of a new GitHub account.\n\nType: `function (user, opts): Promise`\n\n-   `user` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** User details for new account\n    -   `user.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Username\n    -   `user.email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Email\n    -   `user.password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Password\n-   `opts` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options (optional, default `{}`)\n    -   `opts.verifyEmail` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** Whether or not to verify email\n    -   `opts.emailPassword` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Email password for verification\n\n* * *\n\n#### [signin](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L91-L98)\n\nSigns into an existing GitHub account.\n\nNote: either username or email is required.\n\nType: `function (user, opts): Promise`\n\n-   `user` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** User details for new account\n    -   `user.username` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Username\n    -   `user.email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Email\n    -   `user.password` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Password\n-   `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options (optional, default `{}`)\n\n* * *\n\n#### [signout](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L104-L111)\n\nSigns out of the currently authenticated GitHub account.\n\nType: `function (): Promise`\n\n* * *\n\n#### [verifyEmail](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L121-L131)\n\nVerifies the authenticated GitHub account's email via pupeteer-email.\n\nType: `function (opts): Promise`\n\n-   `opts` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** Options\n    -   `opts.emailPassword` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Email password for verification\n    -   `opts.email` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Email verification (defaults to user's GitHub email)\n\n* * *\n\n#### [starPackage](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L145-L148)\n\nStars an npm package's github repository.\n\nType: `function (pkgName): Promise`\n\n-   `pkgName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** NPM package name\n\nExample:\n\n```javascript\nconst gh = new PuppeteerGitHub()\nawait gh.signin(...)\nawait gh.starPackage('react')\nawait gh.close()\n```\n\n* * *\n\n#### [unstarPackage](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L156-L159)\n\nUnstars an npm package's github repository.\n\nType: `function (pkgName): Promise`\n\n-   `pkgName` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** NPM package name\n\n* * *\n\n#### [starRepo](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L174-L177)\n\nStars a github repository.\n\nType: `function (repo): Promise`\n\n-   `repo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** GitHub repository identifier\n\nExample:\n\n```javascript\nconst gh = new PuppeteerGitHub()\nawait gh.signin(...)\nawait gh.starRepo('avajs/ava')\nawait gh.starRepo('https://github.com/facebook/react')\nawait gh.close()\n```\n\n* * *\n\n#### [unstarRepo](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L185-L188)\n\nUnstars a github repository.\n\nType: `function (repo): Promise`\n\n-   `repo` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** GitHub repository identifier\n\n* * *\n\n#### [close](https://github.com/transitive-bullshit/puppeteer-github/blob/26f3f7d2bf8f52fecd0024135c17fffd5251afe9/index.js#L195-L198)\n\nCloses the underlying browser instance, effectively ending this session.\n\nType: `function (): Promise`\n\n* * *\n\n## Related\n\n-   [puppeteer-github-cli](https://github.com/transitive-bullshit/puppeteer-github-cli) - CLI for this module.\n-   [puppeteer-email](https://github.com/transitive-bullshit/puppeteer-email) - Email automation driven by headless chrome.\n-   [puppeteer](https://github.com/GoogleChrome/puppeteer) - Headless Chrome Node API.\n-   [awesome-puppeteer](https://github.com/transitive-bullshit/awesome-puppeteer) - Curated list of awesome puppeteer resources.\n\n## License\n\nMIT © [Travis Fischer](https://github.com/transitive-bullshit)\n\nSupport my OSS work by \u003ca href=\"https://twitter.com/transitive_bs\"\u003efollowing me on twitter \u003cimg src=\"https://storage.googleapis.com/saasify-assets/twitter-logo.svg\" alt=\"twitter\" height=\"24px\" align=\"center\"\u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fpuppeteer-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransitive-bullshit%2Fpuppeteer-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransitive-bullshit%2Fpuppeteer-github/lists"}