Skip to content

gh pr edit --add-assignee purges existing list #11140

Closed as duplicate
Closed as duplicate

Description

@KajsaSandvik

Describe the bug

I used to run gh pr edit --add-assignee as part of a actions workflow to add a user to the list of assignees. Now, it instead behaves as a setting function, removing all other users and replacing them with the one provided in the argument.

Affected version

2.74.0, 2.74.1

Steps to reproduce the behavior

  1. Create a pull request, assign it to at least one person, let's say user-1
  2. run gh pr edit --add-assignee [other-user]
    1. gh pr view or look at the website - only other-user is assigned

Expected vs actual behavior

In reproduction step 3. I expect both user-1 and other-user to be assigned to the pull request.

Logs

GH_DEBUG=true gh pr edit develop --add-assignee [OTHER-USER]
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
* Request at 2025-06-17 09:14:01.852778 +0200 CEST m=+0.128753001
* Request to https://api.github.com/graphql
* Request took 499.60125ms
⣾* Request at 2025-06-17 09:14:02.401307 +0200 CEST m=+0.677284251
* Request to https://api.github.com/graphql
⣟* Request took 1.53446875s
* Request at 2025-06-17 09:14:03.97487 +0200 CEST m=+2.250854167
* Request to https://api.github.com/graphql
⣷* Request took 233.874792ms
⣾* Request at 2025-06-17 09:14:04.234222 +0200 CEST m=+2.510207126
* Request to https://api.github.com/graphql
⡿* Request took 520.797166ms
⣾* Request at 2025-06-17 09:14:04.803083 +0200 CEST m=+3.079070751
* Request to https://api.github.com/graphql
⣻* Request took 1.180010916s
* Request at 2025-06-17 09:14:06.029395 +0200 CEST m=+4.305388126
* Request to https://api.github.com/graphql
⣷* Request took 570.689541ms
https://github.com/[OWNER]/[REPO]/pull/[NUMBER]

Activity

  1. williammartin commented on Jun 17, 2025

    @williammartin
    Member

    Yep, I can reproduce this, thanks for the report.

    ➜  gh pr view https://github.com/cli/cli/pull/11134 --json assignees | cat
    {"assignees":[{"id":"MDQ6VXNlcjQ3Mzk0MjAw","login":"BagToad","name":"Kynan Ware"}]}
    
    ➜  gh pr edit https://github.com/cli/cli/pull/11134 --add-assignee williammartin
    https://github.com/cli/cli/pull/11134
    
    ➜  gh pr view https://github.com/cli/cli/pull/11134 --json assignees | cat
    {"assignees":[{"id":"MDQ6VXNlcjE2MTE1MTA=","login":"williammartin","name":"William Martin"}]}
    
  2. added
    priority-2Affects more than a few users but doesn't prevent core functions
    on Jun 17, 2025
  3. williammartin commented on Jun 17, 2025

    @williammartin
    Member

    Actually I think this was already fixed in #11065, I thought it went into v2.74.1 but it actually missed that cut. Will try to get a release today, thanks for the report and sorry for the inconvenience.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandneeds-triageneeds to be reviewedpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions