NuKeeper icon indicating copy to clipboard operation
NuKeeper copied to clipboard

Option to link to a work item for PRs in azure devops

Open yufeih opened this issue 2 years ago • 5 comments

🚀 Feature Requests

PRs in our azure devops repos must be linked to a work item. Today we manually link each PR. It would be very helpful if there is an option to set the work item ID and auto completion for PRs opened by nukeeper.

Platforms affected (mark all that apply)

  • [ ] :hammer_and_wrench: NuKeeper CLI
  • [ ] :sparkles: GitHub
  • [x] :robot: AzureDevops
  • [ ] :checkered_flag: Bitbucket
  • [ ] :earth_americas: Gitlab
  • [ ] :tv: Gitea
  • [ ] :whale: Docker

yufeih avatar Aug 25 '21 02:08 yufeih

We would need this feature as well! +1

But I am not sure what the health state of nukeeper is.... is there still someone contributing?

zplan avatar Sep 03 '21 12:09 zplan

Since I'm only using Bitbucket and GitHub, I need a few clarifications.

How can a work item be linked in AzureDevOps. Is it enough to have it in the commit message (like for Bitbucket) or is it an explicit action?

How is "auto completion for PRs opened by nukeeper" related to the work item? Is this another feature request?

msallin avatar Sep 20 '21 16:09 msallin

Hi @msallin I did it on my fork of nukeeper: https://github.com/zplan/NuKeeper/commit/b5eb08e37945821c0a9456728e0f30f988ea9b40

Some notes:

  • It is implemented similar to Labels and it is working but there may be better ways to create the projectUrl in AzureDevopsPlatform.cs.
  • I have just updated compiling issues in the test projects
  • Having the workitem list on the interface leads to a lot of unused parameters for all other platforms (but that is also with labels already)

zplan avatar Sep 21 '21 14:09 zplan

I also looked into the "auto complete" topic and it looks like that it is already implemented

[Option(CommandOptionType.NoValue, ShortName = "", LongName = "setautomerge",
Description = "Set automatically auto merge for created pull request. Works only for Azure Devops. Defaults to false.")]
public bool? SetAutoMerge { get; set; }

I was also not aware of that but with the argument --setautomerge it should do an autocomplete.

Because in AzureDevopsPlatform.cs it checks for AutoMerge and sets the AutoComplete:

if (request.SetAutoMerge)
{
	await _client.SetAutoComplete(new PRRequest()
		{
			autoCompleteSetBy = new Creator(){ id = pullRequest.CreatedBy.id }
		}, target.Owner,
		repo.id,
		pullRequest.PullRequestId);
}

Naming could be better :)

zplan avatar Sep 22 '21 12:09 zplan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 24 '21 00:12 stale[bot]