Last active
March 13, 2018 14:10
Load Oracle APEX Team Development into Bitbucket issues
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
l_clob clob; | |
l_body clob; | |
begin | |
for r in (select feature_name as title, '*'||focus_area||'*' ||feature_description || ' ' || publishable_description || '' as description | |
from apex_team_features | |
where nvl(feature_status,0) < 100 and nvl(focus_area,'A') <> 'ON HOLD') | |
-- change where to what you need | |
loop | |
apex_json.initialize_clob_output; | |
apex_json.open_object; | |
apex_json.write(p_name => 'title', p_value => r.title); | |
apex_json.open_object(p_name => 'content'); | |
apex_json.write(p_name => 'raw', p_value => r.description); | |
apex_json.close_object; | |
apex_json.close_object; | |
l_body := apex_json.get_clob_output; | |
apex_json.free_output; | |
apex_web_service.g_request_headers(1).name := 'Content-Type'; | |
apex_web_service.g_request_headers(1).value := 'application/json'; | |
l_clob := apex_web_service.make_rest_request( | |
p_url => 'https://api.bitbucket.org/2.0/repositories/owner/repo/issues', | |
p_http_method => 'POST', | |
p_username => 'xxx', | |
p_password => 'xxx', | |
p_body => l_body); | |
end loop; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment