-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: github action will miss ref and use default branch #3822
base: main
Are you sure you want to change the base?
Conversation
Protip: do NOT change the domain. |
Thanks, it's really not a good choice, as the old domain owner not maintain it now, we want to work with a new domain, this domain migrate just want to save exist old user configs/entiries/devices. if we drop it, old integration can't works in new HA, also no any bug fix, and they should start from zero with all the old configs and device history. so we want to have a try, test it and confirm it what we can do, we have finished some config_entries/device_entries update in new domain, but still under test. found this hacs/action failed and try to fix it. |
@coderabbitai review |
WalkthroughWalkthroughThe changes improve code readability by standardizing comment formatting and enhancing method functionalities in the HACS (Home Assistant Custom Component Store) project. Specifically, comments were streamlined, unused imports were removed, and methods were updated for more accurate data retrieval. These modifications collectively contribute to a cleaner, more efficient, and robust codebase. Changes
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (4)
Additional comments not posted (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
changes requested, and rebase needed.
e43ec38
to
172dfae
Compare
Hi @ludeeus , sorry for the delay, finished update based on review comments. please help to check again |
Issue:
we want to migrate a domain name, PR: wuwentao/midea_ac_lan#159
PR submit from fork repo with different branch name.
github action uses
hacs/action@main
to verify PRit only return “Error: Not Found”
no any ERROR log or step output in debug mode.
after fork it and add too many log info to print the step and args, found it caused by
ref
args miss:action.py
runhacs.async_register_repository()
withref
argsasync_register_repository
defined incustom_components/hacs/base.py
line 562, it callawait repository.async_registration(ref)
, also includeref
argsrepository.async_registration(ref)
defined incustom_components/hacs/repositories/base.py
, in line 842, it callself.validate_repository()
withoutref
args, butself.ref
is availablevalidate_repository()
defined incustom_components/hacs/repositories/integration.py
, in line 73, it callcommon_validate
incustom_components/hacs/repositories/base.py
, and it will run this lineif manifest := await self.async_get_hacs_json():
, it missedref
args, so add arg:ref=self.ref
to fix it.custom_components/hacs/repositories/integration.py
after line 73 invalidate_repository()
.if manifest := await self.async_get_integration_manifest():
, also missed ref args and use default branch value.async_get_integration_manifest
, as there is domain rename and dir rename, default branch don't have this dir andmainfest.json
, it continue using default branch and callresponse = await self.hacs.async_github_api_method()
in line 183async_github_api_method()
definded incustom_components/hacs/base.py
line 492, andtry
job can't pass with a exception:Not Found
, so only print this error log.checked with the same
async_get_integration_manifest
andasync_get_hacs_json
, addref=self.ref
to run it in normal branch and action.issue fixed.
in addtion, also remove some minior error , like duplicate
##
comments, removefrom .utils.json import json_loads
as import but not used.please help to review and confirm whether it's the expect result.
github action error log:
https://github.com/wuwentao/midea_ac_lan/actions/runs/9672246348/job/26686312538
after add the
ref
args fix, it can report the expect ERROR log as below:https://github.com/wuwentao/midea_ac_lan/actions/runs/9672246348/job/26687155544
Thanks