-
Notifications
You must be signed in to change notification settings - Fork 9
Add ADO support and ADO git URL handling #960
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
base: main
Are you sure you want to change the base?
Changes from all commits
a8a7c25
ee3795a
9b4eb26
d8bc46f
5524062
ac38c11
d8aa431
54d23de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@secustor/backstage-plugin-renovate-backend': patch | ||
| '@secustor/backstage-plugin-renovate-common': patch | ||
| --- | ||
|
|
||
| Modifies getTargetRepo to accept ADO's odd org/\_git/repo form and adds support for ADO as a config option | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ Supported platforms: | |
|
|
||
| - Github | ||
| - Gitlab | ||
| - AzureDevOps | ||
|
|
||
| ## Getting started | ||
|
|
||
|
|
@@ -45,6 +46,9 @@ integrations: | |
| github: | ||
| - host: github.com | ||
| token: ${GITHUB_TOKEN} | ||
| azure: | ||
| - host: dev.azure.com | ||
| token: ${AZURE_PAT_TOKEN} | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not correct based on the docs. https://backstage.io/docs/integrations/azure/locations#using-a-personal-access-token-pat
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are correct, it is a deprecated method though still currently working. The way listed in the docs is the updated way though I wasn't sure if more changes would've been needed if I did the one listed in their docs. I can test and find out though. If it isn't a huge hassle, I'll update it to use the documented version shortly.
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, please update to the upstream documented style |
||
|
|
||
| backend: | ||
| cache: | ||
|
|
@@ -97,6 +101,7 @@ renovate: | |
| queue: | ||
| type: local-fastq | ||
|
|
||
| # Can pass any Renovate config through here. | ||
| config: | ||
| # only do a lookup and create reports with updates and do not open PRs | ||
| dryRun: lookup | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,9 +20,21 @@ export function getTargetRepo( | |||||
| return target; | ||||||
| } | ||||||
| const url = getTargetURL(target); | ||||||
|
|
||||||
| let repository = url.full_name; | ||||||
|
|
||||||
| if (repository.includes('/_git/')) { | ||||||
| const parts = repository.split('/_git/'); | ||||||
| const leftSide = parts[0].split('/'); | ||||||
| const repoName = parts[1]; | ||||||
| const projectName = leftSide[leftSide.length - 1]; | ||||||
|
|
||||||
| repository = `${projectName}/${repoName}`; | ||||||
| } | ||||||
|
|
||||||
| return { | ||||||
| host: url.resource, | ||||||
| repository: url.full_name, | ||||||
| repository: repository, | ||||||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Rather than doing this manually this seems more stable |
||||||
| }; | ||||||
| } | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also split up these changesets please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, not too familiar with changesets. Yeah, I can break them up into one for each package.