unlockLockable will unlock an issue or pull request
(httpClient *http.Client, repo ghrepo.Interface, lockable *api.Issue)
| 327 | |
| 328 | // unlockLockable will unlock an issue or pull request |
| 329 | func unlockLockable(httpClient *http.Client, repo ghrepo.Interface, lockable *api.Issue) error { |
| 330 | |
| 331 | var mutation struct { |
| 332 | UnlockLockable struct { |
| 333 | UnlockedRecord struct { |
| 334 | Locked bool |
| 335 | } |
| 336 | } `graphql:"unlockLockable(input: $input)"` |
| 337 | } |
| 338 | |
| 339 | variables := map[string]interface{}{ |
| 340 | "input": githubv4.UnlockLockableInput{ |
| 341 | LockableID: lockable.ID, |
| 342 | }, |
| 343 | } |
| 344 | |
| 345 | gql := api.NewClientFromHTTP(httpClient) |
| 346 | return gql.Mutate(repo.RepoHost(), "UnlockLockable", &mutation, variables) |
| 347 | } |
| 348 | |
| 349 | // relockLockable will unlock then lock an issue or pull request. A common use |
| 350 | // case would be to change the reason for locking. |
no test coverage detected