{"id":15705626,"url":"https://github.com/technote-space/github-action-pr-helper","last_synced_at":"2025-05-12T18:38:16.965Z","repository":{"id":38195900,"uuid":"222109830","full_name":"technote-space/github-action-pr-helper","owner":"technote-space","description":"PullRequest Helper for GitHub Actions","archived":false,"fork":false,"pushed_at":"2023-05-21T16:48:55.000Z","size":2971,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T20:04:38.414Z","etag":null,"topics":["github-actions"],"latest_commit_sha":null,"homepage":"","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/technote-space.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://paypal.me/technote0space"}},"created_at":"2019-11-16T14:18:39.000Z","updated_at":"2023-03-12T09:35:42.000Z","dependencies_parsed_at":"2024-10-24T07:06:46.660Z","dependency_job_id":"3ecb1961-56de-4882-9121-afbeb4e7b79e","html_url":"https://github.com/technote-space/github-action-pr-helper","commit_stats":{"total_commits":833,"total_committers":3,"mean_commits":277.6666666666667,"dds":0.3457382953181273,"last_synced_commit":"5ea9ea63b91de3b8f490ba2ab80f3b9125880b5f"},"previous_names":[],"tags_count":166,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technote-space%2Fgithub-action-pr-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technote-space%2Fgithub-action-pr-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technote-space%2Fgithub-action-pr-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/technote-space%2Fgithub-action-pr-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/technote-space","download_url":"https://codeload.github.com/technote-space/github-action-pr-helper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171950,"owners_count":20247878,"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":["github-actions"],"created_at":"2024-10-03T20:18:01.029Z","updated_at":"2025-03-12T06:31:37.021Z","avatar_url":"https://github.com/technote-space.png","language":"TypeScript","funding_links":["https://paypal.me/technote0space"],"categories":[],"sub_categories":[],"readme":"# GitHub Action PR Helper\n\n[![npm version](https://badge.fury.io/js/%40technote-space%2Fgithub-action-pr-helper.svg)](https://badge.fury.io/js/%40technote-space%2Fgithub-action-pr-helper)\n[![CI Status](https://github.com/technote-space/github-action-pr-helper/workflows/CI/badge.svg)](https://github.com/technote-space/github-action-pr-helper/actions)\n[![codecov](https://codecov.io/gh/technote-space/github-action-pr-helper/branch/master/graph/badge.svg)](https://codecov.io/gh/technote-space/github-action-pr-helper)\n[![CodeFactor](https://www.codefactor.io/repository/github/technote-space/github-action-pr-helper/badge)](https://www.codefactor.io/repository/github/technote-space/github-action-pr-helper)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/technote-space/github-action-pr-helper/blob/master/LICENSE)\n\n*Read this in other languages: [English](README.md), [日本語](README.ja.md).*\n\nGitHub Actions 用のプルリクヘルパー\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eDetails\u003c/summary\u003e\n\n- [使用方法](#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)\n- [引数](#%E5%BC%95%E6%95%B0)\n- [動作](#%E5%8B%95%E4%BD%9C)\n- [Author](#author)\n\n\u003c/details\u003e\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## 使用方法\n1. インストール  \n   * npm  \n   `npm i @technote-space/github-action-pr-helper`\n   * yarn  \n   `yarn add @technote-space/github-action-pr-helper`\n1. 使用\n```typescript\nimport { run } from '@technote-space/github-action-pr-helper';\n\nrun({\n\tactionName: 'Test Action',\n\tactionOwner: 'octocat',\n\tactionRepo: 'hello-world',\n});\n```\n\n## 引数\n@see [types.ts](src/types.ts)\n\n## 動作\n1. 作業ディレクトリを初期化  \n2. ブランチ `${prBranchPrefix}${prBranchName}` をclone  \n3. cloneが成功したか確認  \n3.a 成功した場合  \n3.a.1 head refをマージ  \n3.a.2 マージに失敗したらabort merge  \n3.b 失敗した場合  \n3.b.1 head refをclone  \n3.b.2 ブランチ `${prBranchPrefix}${prBranchName}` を作成  \n4. コマンドを実行  \n5. 変更があるかをチェック  \n5.a 変更がない場合  \n5.a.1 関連するプルリクエストを取得  \n5.a.2 プルリクエストがない場合、終了  \n5.a.3 HEADとhead refに違いがない場合、プルリクエストを閉じて終了  \n5.a.4 マージ可能かどうかのパラメータを取得  \n5.b 変更がある場合  \n5.b.1 Commit  \n5.b.2 HEADとhead refに違いがない場合、プルリクエストを閉じて終了  \n5.b.3 Push  \n5.b.4 コマンドの実行結果とともにプルリクエストまたはコメントを作成  \n5.b.5 マージ可能かどうかのパラメータを取得  \n6. マージ可能でない場合、コンフリクトを解決  \n6.1 マージを試みて成功したらPush  \n6.2 マージが失敗したらRebase処理  \n6.2.1 作業ディレクトリを初期化  \n6.2.2 ref branchをclone  \n6.2.3 ブランチ `${prBranchPrefix}${prBranchName}` を作成  \n6.2.4 コマンドを実行  \n6.2.5 Commit  \n6.2.6 Force push  \n6.2.7 プルリクエストを更新  \n\n## Author\n[GitHub (Technote)](https://github.com/technote-space)  \n[Blog](https://technote.space)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnote-space%2Fgithub-action-pr-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnote-space%2Fgithub-action-pr-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnote-space%2Fgithub-action-pr-helper/lists"}