PullRequest Helper for GitHub Actions.
npm install @technote-space/github-action-pr-helper




Read this in other languages: English, 日本語.
GitHub Actions 用のプルリクヘルパー
Details
npm i @technote-space/github-action-pr-helperyarn add @technote-space/github-action-pr-helpertypescript
import { run } from '@technote-space/github-action-pr-helper';run({
actionName: 'Test Action',
actionOwner: 'octocat',
actionRepo: 'hello-world',
});
`引数
@see types.ts動作
1. 作業ディレクトリを初期化
2. ブランチ ${prBranchPrefix}${prBranchName} をclone
3. cloneが成功したか確認
3.a 成功した場合
3.a.1 head refをマージ
3.a.2 マージに失敗したらabort merge
3.b 失敗した場合
3.b.1 head refをclone
3.b.2 ブランチ ${prBranchPrefix}${prBranchName} を作成
4. コマンドを実行
5. 変更があるかをチェック
5.a 変更がない場合
5.a.1 関連するプルリクエストを取得
5.a.2 プルリクエストがない場合、終了
5.a.3 HEADとhead refに違いがない場合、プルリクエストを閉じて終了
5.a.4 マージ可能かどうかのパラメータを取得
5.b 変更がある場合
5.b.1 Commit
5.b.2 HEADとhead refに違いがない場合、プルリクエストを閉じて終了
5.b.3 Push
5.b.4 コマンドの実行結果とともにプルリクエストまたはコメントを作成
5.b.5 マージ可能かどうかのパラメータを取得
6. マージ可能でない場合、コンフリクトを解決
6.1 マージを試みて成功したらPush
6.2 マージが失敗したらRebase処理
6.2.1 作業ディレクトリを初期化
6.2.2 ref branchをclone
6.2.3 ブランチ ${prBranchPrefix}${prBranchName}` を作成