How to pull Github Repository names into Select Box during form/page load?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 09:38 AM
What is the best way to pull all the names of repositories belonging to my organization from Github and load it to Select Box datasource making it available for selection after form/page has loaded... Thanks in Advance!
- Labels:
-
Integrations
-
Scoped App Development
-
Studio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 10:53 AM
You could check out the use of Remote Tables that use a Datastream action to populate data from an API:
Remote Tables:
https://docs.servicenow.com/en-US/bundle/sandiego-servicenow-platform/page/administer/remote-tables/...
GitHub Repos API:
https://docs.github.com/en/rest/repos/repos#list-organization-repositories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 12:39 PM
Thanks for your response Madame Kristy, should the Api be called on every form load to update the table and how will I bind the Selection Box with the remote table. Also do you think Github Spoke will be a viable solution for this issue?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2022 02:09 PM
I definitely think the GitHub Spoke will get you there.
It appears that Spoke already contains a Remote Table and Definition for listing Repositories:
Once you've configured your Connection and Credential for the GitHub Spoke (documented here), you can use this remote table just like any other table on the platform.
You can designate how often the data is refreshed in the Remote Table Definition. You'll need to click on Advanced to access that setting. Also help to keep in mind - the cache setting is per user.