Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@technote-space/github-action-pr-helper",
"version": "2.1.7",
"version": "2.1.8",
"description": "PullRequest Helper for GitHub Actions.",
"keywords": [
"github",
Expand Down Expand Up @@ -36,26 +36,26 @@
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0",
"@octokit/openapi-types": "^2.0.1",
"@technote-space/filter-github-action": "^0.5.13",
"@technote-space/github-action-helper": "^4.4.7",
"@octokit/openapi-types": "^4.0.1",
"@technote-space/filter-github-action": "^0.5.16",
"@technote-space/github-action-helper": "^4.4.10",
"moment": "^2.29.1"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@technote-space/github-action-test-helper": "^0.6.10",
"@types/jest": "^26.0.19",
"@types/node": "^14.14.16",
"@typescript-eslint/eslint-plugin": "^4.11.1",
"@typescript-eslint/parser": "^4.11.1",
"eslint": "^7.16.0",
"husky": "^4.3.6",
"@technote-space/github-action-test-helper": "^0.6.13",
"@types/jest": "^26.0.20",
"@types/node": "^14.14.25",
"@typescript-eslint/eslint-plugin": "^4.14.2",
"@typescript-eslint/parser": "^4.14.2",
"eslint": "^7.19.0",
"husky": "^4.3.8",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"lint-staged": "^10.5.3",
"nock": "^13.0.5",
"ts-jest": "^26.4.4",
"nock": "^13.0.7",
"ts-jest": "^26.5.0",
"typescript": "^4.1.3"
},
"publishConfig": {
Expand Down
12 changes: 6 additions & 6 deletions src/utils/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,14 @@ export const resolveConflicts = async(branchName: string, helper: GitHelper, log
export const getDefaultBranch = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('repos', {
owner: context.actionContext.repo.owner,
repo: context.actionContext.repo.repo,
}), async() => await getApiHelper(octokit, context).getDefaultBranch(), context);
}), () => getApiHelper(octokit, context).getDefaultBranch(), context);

export const getCurrentVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('current-version'), async() => await getApiHelper(octokit, context).getLastTag(), context);
export const getCurrentVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('current-version'), () => getApiHelper(octokit, context).getLastTag(), context);

export const getNewPatchVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('new-patch-version'), async() => await getApiHelper(octokit, context).getNewPatchVersion(), context);
export const getNewPatchVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('new-patch-version'), () => getApiHelper(octokit, context).getNewPatchVersion(), context);

export const getNewMinorVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('new-minor-version'), async() => await getApiHelper(octokit, context).getNewMinorVersion(), context);
export const getNewMinorVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('new-minor-version'), () => getApiHelper(octokit, context).getNewMinorVersion(), context);

export const getNewMajorVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('new-major-version'), async() => await getApiHelper(octokit, context).getNewMajorVersion(), context);
export const getNewMajorVersion = async(octokit: Octokit, context: ActionContext): Promise<string> => getCache<string>(getCacheKey('new-major-version'), () => getApiHelper(octokit, context).getNewMajorVersion(), context);

export const findPR = async(branchName: string, octokit: Octokit, context: ActionContext): Promise<PullsListResponseData | Null> => getCache(getCacheKey('pr', {branchName}), async() => getApiHelper(octokit, context).findPullRequest(branchName), context);
export const findPR = async(branchName: string, octokit: Octokit, context: ActionContext): Promise<PullsListResponseData | Null> => getCache(getCacheKey('pr', {branchName}), () => getApiHelper(octokit, context).findPullRequest(branchName), context);
Loading