diff --git a/package.json b/package.json index b1bd1fc..1862193 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@technote-space/github-action-pr-helper", - "version": "2.1.5", + "version": "2.1.6", "description": "PullRequest Helper for GitHub Actions.", "keywords": [ "github", @@ -38,7 +38,7 @@ "@actions/github": "^4.0.0", "@octokit/openapi-types": "^2.0.0", "@technote-space/filter-github-action": "^0.5.11", - "@technote-space/github-action-helper": "^4.4.4", + "@technote-space/github-action-helper": "^4.4.5", "moment": "^2.29.1" }, "devDependencies": { @@ -50,7 +50,7 @@ "@typescript-eslint/eslint-plugin": "^4.9.1", "@typescript-eslint/parser": "^4.9.1", "eslint": "^7.15.0", - "husky": "^4.3.5", + "husky": "^4.3.6", "jest": "^26.6.3", "jest-circus": "^26.6.3", "lint-staged": "^10.5.3", diff --git a/src/utils/command.ts b/src/utils/command.ts index 64a4bc3..45f757b 100644 --- a/src/utils/command.ts +++ b/src/utils/command.ts @@ -7,7 +7,6 @@ import {components} from '@octokit/openapi-types'; import { getActionDetail, isDisabledDeletePackage, - getPrBaseRef, getPrHeadRef, getContextBranch, getGitFilterStatus, @@ -32,7 +31,7 @@ const {getWorkspace, getLocalRefspec, getRefspec} = Utils; const {getOctokit, ensureNotNullValue, useNpm} = Utils; const {getRepository, isPush} = ContextHelper; -export const getApiHelper = (octokit: Octokit, context: ActionContext, logger?: Logger, refForUpdate?: string): ApiHelper => new ApiHelper(octokit, context.actionContext, logger, {refForUpdate}); +export const getApiHelper = (octokit: Octokit, context: ActionContext, logger?: Logger): ApiHelper => new ApiHelper(octokit, context.actionContext, logger); export const clone = async(helper: GitHelper, logger: Logger, octokit: Octokit, context: ActionContext): Promise => { const branchName = await getPrBranchName(helper, octokit, context); @@ -369,7 +368,7 @@ export const resolveConflicts = async(branchName: string, helper: GitHelper, log } await commit(helper, logger, context); await forcePush(branchName, helper, logger, context); - await getApiHelper(getOctokit(getApiToken()), context, logger, getPrBaseRef(context)).pullsCreateOrUpdate(branchName, { + await getApiHelper(getOctokit(getApiToken()), context, logger).pullsCreateOrUpdate(branchName, { title: await getPrTitle(helper, octokit, context), body: await getPrBody(false, files, output, helper, octokit, context), }); diff --git a/yarn.lock b/yarn.lock index fe66bdb..d78be37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -777,20 +777,20 @@ "@actions/core" "^1.2.6" "@actions/github" "^4.0.0" -"@technote-space/github-action-helper@^4.4.4": - version "4.4.4" - resolved "https://registry.yarnpkg.com/@technote-space/github-action-helper/-/github-action-helper-4.4.4.tgz#09acc6e4439523d2503adb115d8665e627a2aa44" - integrity sha512-3sy/b+V2GBKVxttEgjVQO+ZL2c0+UsVI10QMdMMR7evyF/wTXv6Pzarh2sHKqiKtnnzjXvfIT8ztfFR0vke7xQ== +"@technote-space/github-action-helper@^4.4.5": + version "4.4.5" + resolved "https://registry.yarnpkg.com/@technote-space/github-action-helper/-/github-action-helper-4.4.5.tgz#e6fdf8e6f881db269c744a8726ea155c2c710a0e" + integrity sha512-+jZ7XoicKa7KnB0IuRmVuK5IvMP2XV5hZtR6YYtbPfuPK13AbaPF/eNqYLzAcRPmNAK3q9pZwdWbT7CCVuwyIA== dependencies: "@actions/core" "^1.2.6" "@actions/github" "^4.0.0" "@octokit/openapi-types" "^2.0.0" "@octokit/plugin-rest-endpoint-methods" "^4.4.1" - "@technote-space/github-action-log-helper" "^0.1.9" + "@technote-space/github-action-log-helper" "^0.1.10" shell-escape "^0.2.0" sprintf-js "^1.1.2" -"@technote-space/github-action-log-helper@^0.1.9": +"@technote-space/github-action-log-helper@^0.1.10": version "0.1.10" resolved "https://registry.yarnpkg.com/@technote-space/github-action-log-helper/-/github-action-log-helper-0.1.10.tgz#88517bd40c742109b12e0dca85752be4e5e28266" integrity sha512-74GA41GBQjv2M3vBF5gLlkLvAYwaDx+PAprRCImBNSuRSArWYEgCC1aS1HrCFNFUpXfKTGYa8qhYh7knK0h/RQ== @@ -2454,10 +2454,10 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -husky@^4.3.5: - version "4.3.5" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.5.tgz#ab8d2a0eb6b62fef2853ee3d442c927d89290902" - integrity sha512-E5S/1HMoDDaqsH8kDF5zeKEQbYqe3wL9zJDyqyYqc8I4vHBtAoxkDBGXox0lZ9RI+k5GyB728vZdmnM4bYap+g== +husky@^4.3.6: + version "4.3.6" + resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.6.tgz#ebd9dd8b9324aa851f1587318db4cccb7665a13c" + integrity sha512-o6UjVI8xtlWRL5395iWq9LKDyp/9TE7XMOTvIpEVzW638UcGxTmV5cfel6fsk/jbZSTlvfGVJf2svFtybcIZag== dependencies: chalk "^4.0.0" ci-info "^2.0.0"