Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kartben opened this issue Apr 26, 2023 · 2 comments · Fixed by zephyrproject-rtos/action-first-interaction#2 · May be fixed by #296
Assignees

Comments

@kartben
Copy link

kartben commented Apr 26, 2023

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;
    }
  }
@github-actions
Copy link

Hello! Thank you for filing an issue.

If this is a bug report, please include relevant logs to help us debug the problem.

kartben added a commit to kartben/first-interaction that referenced this issue Apr 26, 2023
Also use /search API for finding first issue, as previous upstream
implementation had issues when author had only done PRs recently.
Fixes actions#233

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
kartben added a commit to kartben/first-interaction that referenced this issue Apr 26, 2023
Also use /search API for finding first issue, as previous upstream
implementation had issues when author had only done PRs recently.
Fixes actions#233

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
stephanosio pushed a commit to zephyrproject-rtos/action-first-interaction that referenced this issue Apr 27, 2023
Also use /search API for finding first issue, as previous upstream
implementation had issues when author had only done PRs recently.
Fixes actions#233

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
@ncalteen
Copy link
Collaborator

This should be fixed by #296 :) This approach uses GraphQL instead of the REST API, which will let you filter by the type (issue/PR) and creator.

@ncalteen ncalteen self-assigned this Feb 22, 2024
@ncalteen ncalteen linked a pull request Feb 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants