Skip to content

Commit

Permalink
build: release v1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed May 30, 2022
1 parent 66ab5ea commit 5623f83
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/__tests__/action.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
};

Expand Down
9 changes: 2 additions & 7 deletions src/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,15 @@ 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);
}

if (!issue) {
throw new Error(`Couldn't find issue info in current context`);
}


const [owner, repo] = repository.full_name.split('/');
// Check params
if (
Expand Down

0 comments on commit 5623f83

Please sign in to comment.