Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] Add update issue test for GitHubIssuesProvider #1775

Closed
3 tasks
AlitzelMendez opened this issue Jan 9, 2024 · 1 comment
Closed
3 tasks

[Test] Add update issue test for GitHubIssuesProvider #1775

AlitzelMendez opened this issue Jan 9, 2024 · 1 comment
Assignees

Comments

@AlitzelMendez
Copy link
Member

AlitzelMendez commented Jan 9, 2024

When using something like the following

  var issueUpdate = new IssueUpdate{Body = description};

 await client.Issue.Update(owner, name, issueNumber, issueUpdate);

Github deletes some elements of the issue, this is a known scenario for us, let's create an issue so this doesn't happen again, I think there are two instance in which we update the issue so just test that when we are updating an issue we always share all the elements of an issue not only the part we want to update.

Release Note Category

  • Feature changes/additions
  • Bug fixes
  • Internal Infrastructure Improvements

Release Note Description

No release note needed

@AlitzelMendez
Copy link
Member Author

I submitted a PR for this: https://dev.azure.com/dnceng/internal/_git/dotnet-helix-service/pullrequest/36940

It goes through the whole process of creating the issue and deleting it, even though we are just testing the update. I think this is okay, but I also wonder if just updating a previously opened issue would be enough.

The problem with the first option is that we are performing more operations that could fail and are not tested, but it should be fine. Additionally, we are creating an issue every time, so we would end up with a bunch of issues (all of them closed, of course).

The problem with the second option is that we are not controlling the whole scenario and we are not starting with a clean state every time. Some people can manually remove the milestone and such.

I went for the first option of having a clean state every time, but if anyone has concerns about this, please let me know.

FYI @missymessa

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

No branches or pull requests

1 participant