Skip to content

Commit ea4c421

Browse files
author
Alex Holmansky
authored
Merge pull request #27 from alexh97/master
Fix arguments in call to findProjectCardId()
2 parents d0cc954 + 79f09a2 commit ea4c421

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/pr-project-assigner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Assign a PR to project based on label
99
steps:
1010
- name: Assign to project
11-
uses: elastic/github-actions/project-assigner@c73a6dd0666a47e53ba0fc7c2bd2189d76843ed8
11+
uses: elastic/github-actions/project-assigner@b57adc9d9a0f46351c878e14b0e4e43d6d18ac9f
1212
id: project_assigner
1313
with:
1414
issue-mappings: |

.github/workflows/project-assigner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Assign issue or PR to project based on label
99
steps:
1010
- name: Assign to project
11-
uses: elastic/github-actions/project-assigner@c73a6dd0666a47e53ba0fc7c2bd2189d76843ed8
11+
uses: elastic/github-actions/project-assigner@b57adc9d9a0f46351c878e14b0e4e43d6d18ac9f
1212
id: project_assigner
1313
with:
1414
issue-mappings: '[{"label": "wf_test", "projectNumber": 1, "columnName": "To do"}]'

project-assigner/dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20193,7 +20193,7 @@ async function handleLabeled(octokit, projectNumber, columnName, labelToMatch) {
2019320193
}
2019420194

2019520195
// See if the issue or PR is already in the project
20196-
const existingCardId = await findProjectCardId();
20196+
const existingCardId = await findProjectCardId(octokit, projectNumber);
2019720197
if (existingCardId) {
2019820198
console.log(`Card already exists in project ${projectNumber} for ${contentType} ${contentId}`);
2019920199
return;
@@ -20338,7 +20338,7 @@ async function handleUnlabeled(octokit, projectNumber, labelToMatch) {
2033820338
}
2033920339
}
2034020340

20341-
async function findProjectCardId(projectNumber) {
20341+
async function findProjectCardId(octokit, projectNumber) {
2034220342
const owner = github.context.payload.repository.owner.login;
2034320343
const repo = github.context.payload.repository.name;
2034420344
var query, projectCardsPath, cardId;

project-assigner/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function handleLabeled(octokit, projectNumber, columnName, labelToMatch) {
2121
}
2222

2323
// See if the issue or PR is already in the project
24-
const existingCardId = await findProjectCardId();
24+
const existingCardId = await findProjectCardId(octokit, projectNumber);
2525
if (existingCardId) {
2626
console.log(`Card already exists in project ${projectNumber} for ${contentType} ${contentId}`);
2727
return;
@@ -166,7 +166,7 @@ async function handleUnlabeled(octokit, projectNumber, labelToMatch) {
166166
}
167167
}
168168

169-
async function findProjectCardId(projectNumber) {
169+
async function findProjectCardId(octokit, projectNumber) {
170170
const owner = github.context.payload.repository.owner.login;
171171
const repo = github.context.payload.repository.name;
172172
var query, projectCardsPath, cardId;

0 commit comments

Comments
 (0)