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(reconfigure/pr): find reconfigure pr separately #25954
Conversation
Test Runs: To do this, I created two accounts on each platform: one user account and one bot account. I then added the bot account as a member/collaborator on the test repositories. I then proceeded to create a new onboarded repository and a 'reconfigure' branch, along with a corresponding pull request using the user account. Finally, I ran Renovate against all the repositories using the bot account's token. |
What's the reason for only certain platforms? I think: some platforms retrieve every PR already and do filtering on the Renovate client-side. So for those we don't need a new function and can fall back to findPr() |
Got mixed up a bit. Pushing them soon
Since we have to add a new fn for github, and gitlab which will be available via the platform class. I thought it was cleaner to have the function in all platforms. And in the ones that don't need extra logic just pass it onto // platform/gitea/index.ts
async function findReconfigurePr(branchName: string){
return await findPr({ branchName });
}, // workers/repository/reconfigure/index.ts
const reconfigurePr = platform.findReconfigurePr(branchName); Instead of adding an if-logic to handle this in the reconfigure logic. // workers/repository/reconfigure/index.ts
let reconfigurePr: Pr|null = null;
switch(platform){
case "github": reconfigurePr = platform.findReconfigurePr(branchName); break;
case "gitlab": reconfigurePr = platform.findReconfigurePr(branchName); break;
default: reconfigurePr = platform.findPr({ branchName, ...});
} |
You could check for the existence of platform.findReconfigurePr() - you don't need to embed platform-awareness into the worker layer |
Yes, missed that. Thanks. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Rhys Arkins <rhys@arkins.net>
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.
otherwise LGTM
🎉 This PR is included in version 37.111.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Changes
findReconfigurePr
function in supported platforms (GitHub, GitLab, Gitea).toRenovatePR
function to ensure that reconfigure PRs are not filtered out from the list of PRs fetched.Context
Closes: #25754
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: