Minor bug in API: unexpected 404 when trying to assign issues/PRs to a bot


#1

Hey team,

Quick bug report for you, related to apps as it only affects trying to assign bots.

The add assignee to issue endpoint quietly ignores non-existent assignees:

URL: https://api.github.com/repos/dependabot/dependabot-core/issues/549/assignees

Body: {
 "assignees": ["totalrubbishnotauser"]
 }

=> 201 created

A little odd, perhaps, but fine, and maybe not changeable for backwards compatibility reasons.

It also ignores non-existent assignees that are bots:

URL: https://api.github.com/repos/dependabot/dependabot-core/issues/549/assignees

Body: {
 "assignees": ["totalrubbishnotabot[bot]"]
 }

=> 201 created

However, for an existing bot it 404s:

URL: https://api.github.com/repos/dependabot/dependabot-core/issues/549/assignees

Body: {
 "assignees": ["dependabot[bot]"]
 }

=> 404 🔥🔥🔥

Would be good for it to be consistent. Obviously no big deal though - very easy to work around.


#2

:wave: Hey @greysteil!

Thanks for this report! I’ve passed this along to the team, I agree it would be good to stay consistent here.

:sparkles: