Skip to content

Hotfix: Auto Assign PR Author workflow fails with 403 Forbidden for bot-created PRs #2374

Description

@QuangAnhLe

Actual behavior

Description

The Auto Assign PR Author workflow fails when a pull request is created by a bot, for example a dependency-update bot.

The workflow attempts to assign the pull request author by calling:

github.rest.issues.addAssignees(...)

The GitHub API responds with:

RequestError [HttpError]: Forbidden
status: 403
POST /repos/devonfw/IDEasy/issues/{pull_request_number}/assignees

### Reproduce

see PR, that have assiged as Boot https://github.com/devonfw/IDEasy/actions/workflows/assign-pr-author.yml
<img width="1865" height="858" alt="Image" src="https://github.com/user-attachments/assets/6a6b6261-45d5-43f7-b2f0-5e22e7417648" />

### Expected behavior

**The workflow should:**

1. Assign the PR author when the author is assignable.
2. Skip assignment for bot or non-assignable accounts.
3. Complete successfully when assignment is intentionally skipped.
4. Preserve existing assignees.
5. Report a clear log message explaining why assignment was skipped.

### IDEasy status

```bash
Event: pull_request_target
Event type: opened
Workflow: .github/workflows/assign-pr-author.yml
Job: assign-author
Step: Assign PR author if no assignee exists
Action: actions/github-script@v7
Failed API operation: issues.addAssignees
HTTP status: 403 Forbidden

Related/Dependent issues

No response

Comments/Hints

No response

Metadata

Metadata

Assignees

Labels

workflowGitHub actions (CI,CD,update urls/CVEs)

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions