Skip to content

Commit

Permalink
Merge branch 'fix/188' into 'trunk'
Browse files Browse the repository at this point in the history
(#188) Fix segfault when clearing milestone on Gitea forges

Closes #188

See merge request herrhotzenplotz/gcli!207
  • Loading branch information
herrhotzenplotz committed Aug 11, 2023
2 parents d6c939a + 132d81e commit f1b942e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/gcli/gitea/issues.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,8 @@ int gitea_issue_set_milestone(char const *owner,
int issue,
int milestone);

int gitea_issue_clear_milestone(char const *owner,
char const *repo,
int issue);

#endif /* GITEA_ISSUES_H */
1 change: 1 addition & 0 deletions src/forges.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ gitea_forge_descriptor =
.issue_reopen = gitea_issue_reopen,
.issue_assign = gitea_issue_assign,
.issue_set_milestone = gitea_issue_set_milestone,
.issue_clear_milestone = gitea_issue_clear_milestone,
.get_issue_comments = gitea_get_comments,
.get_milestones = gitea_get_milestones,
.get_milestone = gitea_get_milestone,
Expand Down
8 changes: 8 additions & 0 deletions src/gitea/issues.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,11 @@ gitea_issue_set_milestone(char const *const owner,
{
return github_issue_set_milestone(owner, repo, issue, milestone);
}

int
gitea_issue_clear_milestone(char const *owner,
char const *repo,
int issue)
{
return github_issue_set_milestone(owner, repo, issue, 0);
}

0 comments on commit f1b942e

Please sign in to comment.