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

fix(azure): Fix additional argument for getRawFile #9450

Merged

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Apr 8, 2021

Changes:

Current behavior worked just because of config.repoId default parameter. In the case when the second parameter of getRawFile is actually used, we need discover this repo ID first.

Context:

Probably, the better way is to call azureGitApi.getRepositories() in the initPlatform() and store result locally instead of 2–3 more occasional calls from other platform methods. Moreover, it's desirable to check the credentials somehow in the initPlatform() phase, which can be done via repo discovery. Hovewer, it requires pretty substantial refactoring of tests that would block #9171. So, this PR is good enough kind of solution allowing us to release local plugins support first.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository


let repoId: string;
if (repoName) {
const repos = await azureApiGit.getRepositories();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe cache this in config or defaults

@viceice viceice enabled auto-merge (squash) April 8, 2021 16:02
@viceice viceice merged commit fa6d1e3 into renovatebot:master Apr 8, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.107.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@zharinov zharinov deleted the fix/azure-get-raw-file-custom-repo branch April 12, 2021 08:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants