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

Add Azure DevOps integration support #3902

Open
d13 opened this issue Dec 20, 2024 · 0 comments
Open

Add Azure DevOps integration support #3902

d13 opened this issue Dec 20, 2024 · 0 comments
Assignees
Labels
area-autolinks Issues or features related to autolinks area-integrations Issues or features related to integrations area-launchpad Issues or features related to Launchpad
Milestone

Comments

@d13
Copy link
Member

d13 commented Dec 20, 2024

Add full support for Azure DevOps integrations -- prs, issues, and autolinks (launchpad, start work, etc)

Steps (checkpoints)

Follow-ups:

  • PR search in Launchpad
  • same for self-hosted

Additional info

1

some limitations we should be aware of working with Azure and the shared provider library

  • Azure PRs don't include a lot of information we get with other providers like GitHub, GitLab. These include mergeable state (need to check with gkdev how they do "Ready to merge" on those PRs), remote info like remote url associated with the PR's head/base refs (those have to be fetched separately), avatar urls for all involved users (have to be fetched separately), and possibly more I haven't seen yet.
  • For Azure PRs, "assignees" and "reviewers" are the same thing. There is no way to get "mentioned" PRs or issues.

Today (and this is what GKDev does), to get my Azure PRs for Launchpad, I have to:

  1. Get my current user
  2. Get all orgs for my current user
  3. For each of those orgs, get all projects
  4. Then call "getPullRequestsForProject" on each project, with "authorLogin" to get your authored PRs for that project
  5. Then call "getPullRequestsForProject" on each project again, with "assigneeLogin" to get your assigned PRs for that project
  6. Then call "getReposForAzureProject" on each project as well to get all the repo information
  7. Link repos to their corresponding PRs in each project by name, and supply the PR with the repo's remote URL
  8. (possibly more here to get avatar URLs for each user)
  9. Returned the combined list of PRs with remote URLs included

it seems for the time being like all of these calls are a minimum necessity to get you all your Azure PRs for Launchpad. This should all be abstracted away into the shared provider library, but as of this moment it isn't. Probably too big of a lift to move the entire procedure into the library this week, but I can ping Jacob or Jose about doing it and we can update it later (not a blocker for release)

We may want to do at least 1, 2 and 3 on connection to Azure, and cache them locally in the integration, just like we do today with the Jira Cloud integration, because those things aren't likely to change very often. Then we can use the cache to eliminate steps 1, 2 and 3 from the individual queries

2

Found out that shared provider library doesn't support head repository info on PRs for Azure DevOps. We need that critically in order to support finding and opening the PR's repo i.e. from Launchpad and other places.

Made a PR to the library: https://github.com/gitkraken/provider-apis-package-js/pull/208/files

Once that is in and the version is bumped, we can update on our end.

(Also found out that gkdev was treating the base repo as the head repo, so I gave them a heads up too)

@d13 d13 modified the milestones: 16.1-patch, 16.2 Dec 20, 2024
@eamodio eamodio added the area-integrations Issues or features related to integrations label Dec 20, 2024
@d13 d13 added area-autolinks Issues or features related to autolinks area-integrations Issues or features related to integrations area-launchpad Issues or features related to Launchpad and removed area-integrations Issues or features related to integrations labels Dec 20, 2024
@justinrobots justinrobots modified the milestones: 16.2, 16.3 Jan 8, 2025
@axosoft-ramint axosoft-ramint self-assigned this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-autolinks Issues or features related to autolinks area-integrations Issues or features related to integrations area-launchpad Issues or features related to Launchpad
Projects
None yet
Development

No branches or pull requests

5 participants