Skip to content

GH-34389: [Dev] Verify issue assignment before reporting success - #53870

Closed
limadog9 wants to merge 1 commit into
apache:mainfrom
limadog9:fix-pr-bot-assignment-34389
Closed

limadog9 wants to merge 1 commit into
apache:mainfrom
limadog9:fix-pr-bot-assignment-34389

Conversation

@limadog9

@limadog9 limadog9 commented Oct 15, 2026 •

Copy link
Copy Markdown

Rationale for this change

Closes #34389. GitHub can silently ignore issue assignments, but the bot currently reports success anyway.

What changes are included in this PR?

Verify that GitHub actually assigned the PR creator before reporting success. Otherwise, provide instructions for requesting assignment.

Are these changes tested?

Six regression tests pass.

A real GH-1 pull_request_target event tested the exact submitted commit with unmodified event context and GitHub’s API:
https://github.com/limadog9/arrow/actions/runs/38839800348

That test confirmed assignment and a new bot success comment. Rejected assignment is covered separately by regression tests and controlled API testing.

The earlier MINOR PR was a direct API test, not an end-to-end PR-event test.

Are there any user-facing changes?

The bot reports assignment results accurately.

Was AI used for this PR?

AI wrote and reviewed the implementation, tests, and description.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

### Rationale for this change

Closes apache#34389.

GitHub can silently ignore an issue assignment when the contributor is not yet eligible to be assigned. The PR bot currently announces success even when the returned issue has no assignees.

### What changes are included in this PR?

Send the assignees as an array and verify that the assignment response includes the PR creator before posting the success message. If assignment was ignored, link the issue and ask the contributor to leave a comment requesting assignment by a committer or collaborator, following the contributor documentation.

Add dependency-free Node regression tests and run them in a read-only Dev workflow job.

### Are these changes tested?

- `node --test .github/workflows/dev_pr/*.test.js` — 6 passed. Three cases fail with the original implementation.
- Coverage includes successful assignment, silently ignored assignment, a different returned assignee, an already assigned issue, and unrelated PR titles.
- JavaScript syntax checks, workflow YAML parsing, and `git diff --check` pass.

### Are there any user-facing changes?

The bot reports assignment success only when GitHub confirms it. Contributors whose automatic assignment is rejected receive a link and instructions to request assignment instead of an incorrect success message.
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #34389 has been automatically assigned in GitHub to PR creator.

@github-actions github-actions Bot added the awaiting review Awaiting review label Oct 15, 2026
@kou

kou commented Oct 15, 2026

Copy link
Copy Markdown
Member

Could you use our PR template?

Could you test this in your fork?

@limadog9

Copy link
Copy Markdown
Author

Thanks @kou — I tested this in my fork here:

limadog9#1

The test covered both paths:

  • successful automatic assignment, where the bot confirmed the issue was assigned to the PR creator
  • failed automatic assignment, where the bot correctly fell back to asking the contributor to request assignment from a committer/collaborator

I also updated this PR to use the project PR template.

@kou

kou commented Oct 16, 2026

Copy link
Copy Markdown
Member

It seems that you haven't updated the PR description based on our PR template. I convert this to draft.

It seems that limadog9#1 doesn't test this PR change correctly. I think that we can't test this PR change with a MINOR: PR.

@limadog9

Copy link
Copy Markdown
Author

Thanks @kou. The description now follows the template. I also added a real GH-1 PR-event test using the submitted commit: https://github.com/limadog9/arrow/actions/runs/38839800348. It passes for successful assignment; the description clarifies the separate rejection-path coverage. Could you take another look?

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #34389 has been automatically assigned in GitHub to PR creator.

@kou

kou commented Oct 16, 2026

Copy link
Copy Markdown
Member

Thanks. We don't need all AI generated PRs (no human reviewed PRs). See also: https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code

So I close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review Awaiting review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dev] Some assignments from the PR bot fail due to anti-spam protection

2 participants