Can't find a script or function referenced in a Flow Action? GitHubActionsApiUtils()

jsmcandrew
Tera Expert

I'm looking for GitHubActionsApiUtils() and its function, getWorkflowContent(), to troubleshoot an issue with a malformed URL that it's generating in an integration with GitHub. 

 

The script and function are referenced in a Flow Action called 'GitHub Actions - Get Workflow Content', which is part of the 'CSC Content Pack' application:

 

 
        var githubutils = new GitHubActionsApiUtils();
        var content = githubutils.getWorkflowContent(inputs.baseUrl, inputs.githubOrg, inputs.repo, inputs.workflowPath, inputs.credential);

 

The URL it's returning is https://github.companyname.co.nz/api/v3/repos/company-org/reponame/contents/.github%2Fworkflows%2Fyamlfilename.yml
1 ACCEPTED SOLUTION

ServiceNow Support gave me the URL
/now/nav/ui/classic/params/target/ecc_agent_script_include.do%3Fsys_id%3Dac8a1b943b22e210ad03879a04e45a89%26sysparm_view%3Ddiscovery

View solution in original post

3 REPLIES 3

Tanushree Maiti
Tera Patron

Hi @jsmcandrew 

 

1. Ensure your base URL is strictly formatted as  https://api.github.com with no trailing backslash  in Connection URL

2.  Verify Token and API Endpoints

3. KB2586301 Issue while GitHub integration with DevOps Change Velocity 

KB0820892 Devops: github repository import is failing 

 

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

Sorry not sure I understand that. I can resolve the URL and get a response via curl command from the MID server, so I don't think I need to format the URL with https://api.github. I just wanted to understand why this function referenced in the flow action seemingly doesn't exist, yet it must do because it returns a malformed result. I'm trying to create my own REST step to replicate the script's functionality based on a guess of what it probably does.

ServiceNow Support gave me the URL
/now/nav/ui/classic/params/target/ecc_agent_script_include.do%3Fsys_id%3Dac8a1b943b22e210ad03879a04e45a89%26sysparm_view%3Ddiscovery