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

Loading list of work items #364

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

twenzel
Copy link
Contributor

@twenzel twenzel commented Sep 25, 2022

Initial version of work item tracking.
Support loading a list of work items
Fixes #363

Copy link
Member

@pascalberger pascalberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's your idea of having aliases which return an AzureDevOpsWorkItemTracking object? Why not have an alias which returns an IEnumerable<AzureDevOpsWorkItem>? This would be consistent with implementation for build pipeline:

public static IEnumerable<AzureDevOpsBuild> AzureDevOpsBuilds(

@twenzel twenzel force-pushed the feature/LoadWorkItems branch from 41de87f to 140d731 Compare September 26, 2022 21:49
@twenzel
Copy link
Contributor Author

twenzel commented Sep 26, 2022

The idea was to have a "root" object to start various operations. Example:

var workItemTrackingSettings =   new AzureDevOpsWorkItemTrackingSettings(
                new Uri("http://myserver:8080/defaultcollection"),
              "MyProject",
                AzureDevOpsAuthenticationNtlm());
        
var workItemTracking =   AzureDevOpsWorkItemTracking(workItemTrackingSettings);
var workItems = workItemTracking.GetWorkItems(new[] {1,42, 555});

workItemTracking.CreateWorkItem("some title", "some description");

var workItems = workItemTracking.Search("anyWIQL");

@pascalberger
Copy link
Member

The idea was to have a "root" object to start various operations.

The issue I have with this approach is that it does not align well with the idea behind this addin. The goal of the addin is to provide convenience methods to access Azure DevOps. Hiding functionality behind an object is less Cake-like and makes the functionality less accessible compared to have them as aliases. Functionality for example won't be listed on the website (https://cakebuild.net/dsl/azure-devops/) or as part of IntelliSense.

@twenzel
Copy link
Contributor Author

twenzel commented Sep 26, 2022

Ok, I'm fine with that. So I'll abandon this PR and improve #357 to return work items instead. Ok?

@pascalberger
Copy link
Member

Ok, I'm fine with that. So I'll abandon this PR and improve #357 to return work items instead. Ok?

Having functionality to load multiple work items makes perfect sense to me. I'm not opposed to the functionality, but prefer to have it implemented as a first class citizen through an AzureDevOpsWorkItems alias, instead of AzureDevOpsWorkItemTracking class.

In my understanding this PR and #357 are about different things (reading work items from a build in #357 vs reading multiple work items based on settings in this PR)

@twenzel
Copy link
Contributor Author

twenzel commented Sep 26, 2022

Great. I've updated PR 357.
I'll re-work this PR in the next couple of days.

@twenzel twenzel force-pushed the feature/LoadWorkItems branch from 140d731 to 785b985 Compare September 27, 2022 06:49
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

Successfully merging this pull request may close these issues.

Option to load work items
2 participants