Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Side effect of unassign people from closed issue #584

Open
earthbound19 opened this issue Nov 28, 2018 · 2 comments
Open

Side effect of unassign people from closed issue #584

earthbound19 opened this issue Nov 28, 2018 · 2 comments

Comments

@earthbound19
Copy link
Contributor

I found that I can remove all assignees from a closed issue with a command like this, run from the directory of the git repo with an associated GitHub remote:

gh is --assign --assignee "" --number 362

--which may not have been any behavior that was intended for gh. What I want is an --unassign-all switch (feature request I suppose, unless it is intended behavior for an empty string assignee to remove all assignees).

Meanwhile, some side effects of this is that it reopened the issue and removed labels from the issue, and I don't want it doing either of those things--I want it to do only what I tell it to.

I don't know whether GitHub's API is making those (presumptuous) choices or gh. If the former this is not an issue with gh.

@protoEvangelion
Copy link
Member

We use https://github.com/octokit/rest.js#readme under the hood and just pass it a list of assignees: https://github.com/node-gh/gh/blob/master/lib/cmds/issue.js#L352 to the edit endpoint.

However, their api endpoints have since updated and seem to be more granular.

We have not updated to their latest version yet so resolving this quickly is unlikely. I am in the process of building out our test suite so that we can confidently make sweeping changes like this.

To implement with their new api, we would probably have to list all assignees and then pass that list of assignees to the removeAssignees endpoint: https://octokit.github.io/rest.js/#api-Issues-removeAssignees

@protoEvangelion
Copy link
Member

Just finished upgrading to their new api so this is possible now! https://octokit.github.io/rest.js/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants