Skip to content

Commit

Permalink
fix:incorrect user feedback after successful cla sign (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcommitshow authored Nov 13, 2024
1 parent 9b1df60 commit 77089a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export async function afterCLA(app, claSignatureInfo) {
}

console.log(`Processing CLA for ${githubUsername ? `user: ${githubUsername}` : 'unknown user'} in org/account: ${org}`);

let failuresToRemoveLabel = 0; // To track the failures in removing labels
try {
//TODO: Check if the Octokit instance is already authenticated with an installation ID
const octokit = await getOctokitForOrg(app, org);
Expand All @@ -188,7 +188,6 @@ export async function afterCLA(app, claSignatureInfo) {

const filteredPrs = prs?.filter(pr => pr?.user?.login === githubUsername);
console.log(`Found ${filteredPrs?.length} open PRs for ${githubUsername} in ${org}:`, filteredPrs?.map(pr => pr?.number).join(', '));
let failuresToRemoveLabel = 0;
for (const pr of filteredPrs) {
const { owner, repo } = parseRepoUrl(pr?.repository_url) || {};
const hasPendingCLALabel = pr.labels?.some(label => label?.name?.toLowerCase() === "pending cla");
Expand Down

0 comments on commit 77089a6

Please sign in to comment.