Socket
Book a DemoInstallSign in
Socket

@technote-space/github-action-pr-helper

Package Overview
Dependencies
Maintainers
1
Versions
163
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@technote-space/github-action-pr-helper

PullRequest Helper for GitHub Actions.

latest
Source
npmnpm
Version
2.4.1
Version published
Weekly downloads
69
-86.86%
Maintainers
1
Weekly downloads
 
Created
Source

GitHub Action PR Helper

npm version CI Status codecov CodeFactor License: MIT

Read this in other languages: English, 日本語.

PullRequest Helper for GitHub Actions.

Table of Contents

Details

Usage

  • Install
    • npm
      npm i @technote-space/github-action-pr-helper
    • yarn
      yarn add @technote-space/github-action-pr-helper
  • Use
import { run } from '@technote-space/github-action-pr-helper';

run({
	actionName: 'Test Action',
	actionOwner: 'octocat',
	actionRepo: 'hello-world',
});

Arguments

@see types.ts

Behavior

  • Initialize working directory
  • Clone branch named ${prBranchPrefix}${prBranchName}
  • Check if clone is succeeded
    3.a Succeeded
    3.a.1 Merge head ref branch
    3.a.2 Abort merge if failed merge
    3.b Failed
    3.b.1 Clone head ref branch
    3.b.2 Create branch named ${prBranchPrefix}${prBranchName}
  • Run commands
  • Check if there is a difference
    5.a No difference
    5.a.1 Find related Pull Request
    5.a.2 Exit if there is no Pull Request
    5.a.3 Close Pull Request and exit if there is no difference between HEAD and head ref
    5.a.4 Get mergeable parameter of Pull Request
    5.b There is a difference
    5.b.1 Commit
    5.b.2 Close Pull Request and exit if there is no difference between HEAD and head ref
    5.b.3 Push
    5.b.4 Create Pull Request or comment with command results
    5.b.5 Get mergeable parameter of Pull Request
  • Resolve conflicts if it is not mergeable
    6.1 Try to merge and push if merge is succeeded
    6.2 Rebase if merge is failed
    6.2.1 Initialize working directory
    6.2.2 Clone head ref branch
    6.2.3 Create branch named ${prBranchPrefix}${prBranchName}
    6.2.4 Run commands
    6.2.5 Commit
    6.2.6 Force push
    6.2.7 Update Pull Request

Author

GitHub (Technote)
Blog

Keywords

github

FAQs

Package last updated on 21 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts