Skip to content

isFirstIssue() won't work in case author has only PRs in their recent history #233

Open
zephyrproject-rtos/action-first-interaction
#2
@kartben

Description

@kartben

The way isFirstIssue() works today makes it sometimes improperly flag an issue as "new" if the only types of issues/PRs found in the list returned by "listForRepo" is PRs

  const {status, data: issues} = await client.rest.issues.listForRepo({
    owner: owner,
    repo: repo,
    creator: sender,
    state: 'all'
  }); 

  // ...

  for (const issue of issues) {
    if (issue.number < curIssueNumber && !issue.pull_request) {
      return false;
    }
  }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions