Skip to content

GRM is unable to add released comments when there are more than 1 milestone on the repository #199

Closed
@AdmiringWorm

Description

Description

When trying to create a release, enabled commenting and there are more than 1 milestone in the repository (don't matter if they are closed or not), GRM is unable to add those comments.

Expected Behavior

Expects GRM to be able to add comments to closed issues that are resolved when a new release is being made.

Actual Behavior

GRM throws the following exception when before trying to add those comments

Closing milestone 0.10.1
Using GitHub as VCS Provider
[FTL] Validation Failed
Octokit.ApiValidationException: Validation Failed
   at Octokit.Connection.HandleErrors(IResponse response)
   at Octokit.Connection.<RunRequest>d__58.MoveNext()
--- End of stack trace from previous location where exception was 
thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.Connection.<Run>d__57`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<GetPage>d__42`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<>c__DisplayClass17_0`1.<<GetAll>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiPagination.<GetAllPages>d__0`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitReleaseManager.Core.GitHubProvider.<AddIssueCommentsAsync>d__25.MoveNext() in C:\projects\gitreleasemanager\Source\GitReleaseManager\GitHubProvider.cs:line 418
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitReleaseManager.Core.GitHubProvider.<CloseMilestone>d__19.MoveNext() in C:\projects\gitreleasemanager\Source\GitReleaseManager\GitHubProvider.cs:line 306
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitReleaseManager.Cli.Program.<CloseMilestoneAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at GitReleaseManager.Cli.Program.<Main>d__3.MoveNext()
{"message":"Validation Failed","errors":[{"value":"0.10.1","resource":"Issue","field":"milestone","code":"invalid"}],"documentation_url":"https://developer.github.com/v3/issues/#list-issues"}

Possible Fix

Will be fixed by passing in the correct expected argument when grabbing the closed issues attached to a milestone (Milestone number, not the title).

Steps to Reproduce

Have two or more milestones in the repository (the one you are going to close, and a different one).
Run the normal gitreleasemanager close command (with commenting enabled of course).

Context

Failed the full release of GRM itself.

Your Environment

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions