{"id":18470866,"url":"https://github.com/xrian/bitbucket-script","last_synced_at":"2026-01-29T23:02:09.085Z","repository":{"id":143932476,"uuid":"165388287","full_name":"xrian/bitbucket-script","owner":"xrian","description":"批量操作bitbucket仓库(创建分支,锁定)","archived":false,"fork":false,"pushed_at":"2019-01-14T02:18:51.000Z","size":2792,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-03T01:43:16.694Z","etag":null,"topics":["api","bitbucket"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/xrian.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-12T13:01:50.000Z","updated_at":"2019-01-14T02:18:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"1c768cc4-a3a9-4cc3-b99b-97a5e5d37046","html_url":"https://github.com/xrian/bitbucket-script","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xrian/bitbucket-script","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrian%2Fbitbucket-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrian%2Fbitbucket-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrian%2Fbitbucket-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrian%2Fbitbucket-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xrian","download_url":"https://codeload.github.com/xrian/bitbucket-script/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xrian%2Fbitbucket-script/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28889863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["api","bitbucket"],"created_at":"2024-11-06T10:15:05.065Z","updated_at":"2026-01-29T23:02:09.071Z","avatar_url":"https://github.com/xrian.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitbucket-script\n批量操作bitbucket上同一个项目下多个仓库(创建分支,锁定)\n\nbitbucket API 文档 https://developer.atlassian.com/bitbucket/api/2/reference/\n\n## 项目介绍\n实现了批量操作 bitbucket 网站中团队帐号下某个项目的多个仓库.\n\n公司是使用bitbucket进行代码托管,有一个团队帐号.在这个帐号下有多个项目.\n一个项目下有多个仓库,比如,pc 端代码一个仓库,后端代码一个仓库,APP 代码一个仓库.因为这几个仓库都是一个项目的,所以,每次发布版本的时候,各个仓库都分支都需要同步进行一些操作,比如,同步创建新分支,锁定旧分支,以保持代码版本一致.为简化工作量,所以写了这个脚本\n\n该项目只有一个网页,全部操作都在该网页中,目前(2018-11-3)只有批量新增分支,批量锁定分支.\n因为只是个简单脚本,目前已满足实际需求,并没有想要维护,所以,前端代码就用 jquery 全部写在一个 HTML 里面.\n\n## 使用前准备\n在使用前,需要先在项目中配置bitbucket帐号(为了准确的保留bitbucket操作记录,建议不要共用密钥私钥)\n1.\t打开bitbucket网站 https://bitbucket.org/dashboard/overview\n![](https://github.com/xrian/bitbucket-script/blob/master/images/step1.png)\n2.  按照箭头提示,依次点击,创建一个oauth用户,然后将密钥私钥填写到项目config.js中.如果已有用户,直接使用其密钥私钥就行(记得分配权限)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/step2.png)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/step3.png)\n3.  打开项目文件夹,在src/config目录下有个config.js.其中有五个选项需要填写\n![](https://github.com/xrian/bitbucket-script/blob/master/images/step4.png)\n填写完成后,就可以启动项目了.\n\n## 使用方法\n1.\t进入到项目文件夹,执行下面命令, 安装依赖包.\n```\n$ npm i\n```\n2.\t启动项目,启动成功后,会在控制台输入启动端口号\n```\n$ node app.js\n```\n3.\t打开网页/assets/index.html,(如果打不开,请检查端口是否正确)\u003cbr\u003e\n   例: http://localhost:7000/assets/index.html\n\n## 操作步骤\n![](https://github.com/xrian/bitbucket-script/blob/master/images/use1.png)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/use2.png)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/use3.png)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/use4.png)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/use5.png)\n![](https://github.com/xrian/bitbucket-script/blob/master/images/use6.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrian%2Fbitbucket-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxrian%2Fbitbucket-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxrian%2Fbitbucket-script/lists"}