-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(bitbucket): main branch status for mend app dashboard #32165
base: main
Are you sure you want to change the base?
feat(bitbucket): main branch status for mend app dashboard #32165
Conversation
Signed-off-by: Adam Setch <[email protected]>
Of course, a Bitbucket Forge App that adds Renovate as a repository left-hand navigation menu would be preferable, but this is may be a sufficient solution in the near-term |
Signed-off-by: Adam Setch <[email protected]>
Signed-off-by: Adam Setch <[email protected]>
Signed-off-by: Adam Setch <[email protected]>
Signed-off-by: Adam Setch <[email protected]>
Signed-off-by: Adam Setch <[email protected]>
I note that the marketplace listing calls this Mend App. Will happily rename the above config option and status name/description to best fit |
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.
Which of these would you expect?
- Turn it on by default, almost nobody would want it off
- Turn it on by default, but in some scenarios users will want it off
- Turn it off by default, users will need to opt-in
Turn it on by default for Mend App users. I assume you have the ability to control defaults for the managed apps? |
Signed-off-by: Adam Setch <[email protected]>
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.
We would want to cache the SHA between runs to avoid setting it unnecessarily on future runs. Renovate already ties the repo extract results to defaultBranchSha, so it would be similar to that.
Also, this is in repo config but is done in initRepo() which occurs before repo config is read
I'm not 100% following the ask. I've refactored it to use |
Your approach will still use one API call per repo per run, even if the head SHA is unchanged. I would like to leverage the repo cache so that we use an API call only when the default branch SHA has changed. |
Signed-off-by: Adam Setch <[email protected]>
if (bbMendAppDashboardStatus) { | ||
const statusName = 'Renovate Dashboard'; | ||
|
||
const mendAppDashboardStatus = await getBranchStatusCheck( |
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.
Leveraged this existing function, which if I understand internally caches the results @rarkins
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.
Will it cache across runs? I didn't think it did
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.
I'm not 100% certain, but i think it does... testing locally I was using pnpm cache-clean
in order to test first-time behavior
Signed-off-by: Adam Setch <[email protected]>
To clarify, is this the goal?
|
Correct, yes. |
Changes
Adds a new optional configuration,
bbMendAppDashboardCheck
which provides a convenient way to quick-launch the Renovate Dashboard for a repository for users of the Mend App on Bitbucket.When set, a successful branch status check will be recorded on the repository's main branch, hyperlinking to that repository's Mend Renovate Dashboard page
Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: