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

Fix unassign #576

Merged
merged 4 commits into from
Jan 17, 2021
Merged

Fix unassign #576

merged 4 commits into from
Jan 17, 2021

Conversation

maxice8
Copy link
Collaborator

@maxice8 maxice8 commented Jan 17, 2021

Description

make unassign actually work

How Has This Been Tested?

On gitlab.alpinelinux.org and gitlab.com

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

Turns out that 0 is not a valid username:

```console
foo@bar:~$ glab issue update --unassign
failed to find user by name : 0
```
turns out it causes segfaults here because we are dealing with a nil
pointer and also if worked it would cause the asssignment to the person
that claimed the username '0'.
@codecov
Copy link

codecov bot commented Jan 17, 2021

Codecov Report

Merging #576 (d4b64ab) into trunk (ec09de9) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            trunk     #576      +/-   ##
==========================================
- Coverage   55.07%   55.07%   -0.01%     
==========================================
  Files         103      103              
  Lines        6912     6913       +1     
==========================================
  Hits         3807     3807              
  Misses       2746     2746              
- Partials      359      360       +1     
Impacted Files Coverage Δ
commands/issue/update/issue_update.go 49.51% <0.00%> (-0.49%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec09de9...d4b64ab. Read the comment docs.

@profclems
Copy link
Owner

I didn't test the --unassign flag, but what was the issue before this PR

@maxice8
Copy link
Collaborator Author

maxice8 commented Jan 17, 2021

It passed a string called 0 which was not a valid username, it would also segfault on mr update

@maxice8 maxice8 merged commit a97419c into profclems:trunk Jan 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants