microsoft / azure-devops-node-api

Azure DevOps Client for Node.js
Other
462 stars 228 forks source link

GitPullRequestSearchCriteria interface (and probably others) out of date #599

Open deerware opened 2 months ago

deerware commented 2 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch azure-devops-node-api@11.2.0 for the project I'm working on.

The GitPullRequestSearchCriteria interface seems to be out of date.

Here is the diff that solved my problem. queryTimeRangeType enum is not specified, just a quick workaround so I can get working.

diff --git a/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts b/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts
index 817e555..0e19174 100644
--- a/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts
+++ b/node_modules/azure-devops-node-api/interfaces/GitInterfaces.d.ts
@@ -1862,6 +1862,18 @@ export interface GitPullRequestSearchCriteria {
      * Whether to include the _links field on the shallow references
      */
     includeLinks?: boolean;
+    /**
+     * If specified, filters pull requests that created/closed before this date based on the queryTimeRangeType specified.
+     */
+    maxTime?: Date;
+    /**
+     * If specified, filters pull requests that created/closed after this date based on the queryTimeRangeType specified.
+     */
+    minTime?: Date;
+    /**
+     * The type of time range which should be used for minTime and maxTime. Defaults to Created if unset.
+     */
+    queryTimeRangeType?: 'created' | 'closed';
     /**
      * If set, search for pull requests whose target branch is in this repository.
      */

This issue body was partially generated by patch-package.

vmapetr commented 1 month ago

Hi @deerware thanks for reporting! We are working on more prioritized issues at the moment, but will get back to this one soon.