From 5623f831410c6b15474181b21e88c619d48a9afc Mon Sep 17 00:00:00 2001 From: pozil Date: Mon, 30 May 2022 14:55:37 +0200 Subject: [PATCH] build: release v1.6.1 --- package-lock.json | 2 +- package.json | 2 +- src/__tests__/action.test.js | 3 +-- src/action.js | 9 ++------- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 60e478b75..f6fc00986 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "auto-assign-issue", - "version": "1.6.0", + "version": "1.6.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index faba4bcb3..3f4d17680 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "auto-assign-issue", - "version": "1.6.0", + "version": "1.6.1", "private": true, "description": "GitHub action that auto-assigns issues to users", "main": "src/index.js", diff --git a/src/__tests__/action.test.js b/src/__tests__/action.test.js index 9fba6059e..aea844c70 100644 --- a/src/__tests__/action.test.js +++ b/src/__tests__/action.test.js @@ -20,8 +20,7 @@ const PR_CONTEXT_PAYLOAD = { const PROJECT_CONTEXT_PAYLOAD = { repository: { full_name: 'mockOrgCard/mockRepoCard' }, project_card: { - content_url: - 'https://github.com/mockOrgCard/mockRepoCard/issues/668' + content_url: 'https://github.com/mockOrgCard/mockRepoCard/issues/668' } }; diff --git a/src/action.js b/src/action.js index b6c5c8801..8c49851aa 100644 --- a/src/action.js +++ b/src/action.js @@ -53,12 +53,8 @@ const runAction = async ( let issue = context.issue?.number || context.pull_request?.number; // If the issue is not found directly, maybe it came for a card movement with a linked issue - if ( - !issue && - context?.project_card?.content_url?.includes('issues') - ) { - const contentUrlParts = - context.project_card.content_url.split('/'); + if (!issue && context?.project_card?.content_url?.includes('issues')) { + const contentUrlParts = context.project_card.content_url.split('/'); issue = parseInt(contentUrlParts[contentUrlParts.length - 1], 10); } @@ -66,7 +62,6 @@ const runAction = async ( throw new Error(`Couldn't find issue info in current context`); } - const [owner, repo] = repository.full_name.split('/'); // Check params if (