mirror of
https://github.com/abapGit/abapGit.git
synced 2025-04-30 11:46:38 +08:00
PR ENUM: fix for private repos (#6592)
This commit is contained in:
parent
bb18b71f52
commit
e7371c8f09
|
@ -61,6 +61,8 @@ CLASS ZCL_ABAPGIT_PR_ENUM_GITHUB IMPLEMENTATION.
|
|||
|
||||
METHOD constructor.
|
||||
|
||||
DATA lv_search TYPE string.
|
||||
|
||||
mv_repo_url = |https://api.github.com/repos/{ iv_user_and_repo }|.
|
||||
mi_http_agent = ii_http_agent.
|
||||
mi_http_agent->global_headers( )->set(
|
||||
|
@ -71,6 +73,16 @@ CLASS ZCL_ABAPGIT_PR_ENUM_GITHUB IMPLEMENTATION.
|
|||
mi_http_agent->global_headers( )->set(
|
||||
iv_key = 'Authorization'
|
||||
iv_val = zcl_abapgit_login_manager=>get( mv_repo_url ) ).
|
||||
ELSE.
|
||||
* fallback, try searching for the git credentials
|
||||
lv_search = mv_repo_url.
|
||||
REPLACE FIRST OCCURRENCE OF 'api.github.com/repos' IN lv_search WITH 'github.com'.
|
||||
IF zcl_abapgit_login_manager=>get( lv_search ) IS NOT INITIAL.
|
||||
mi_http_agent->global_headers( )->set(
|
||||
iv_key = 'Authorization'
|
||||
iv_val = zcl_abapgit_login_manager=>get( lv_search ) ).
|
||||
ENDIF.
|
||||
|
||||
ENDIF.
|
||||
|
||||
ENDMETHOD.
|
||||
|
|
Loading…
Reference in New Issue
Block a user