Skip to content

SergeyMi37/GitHubAPI

This branch is 2 commits ahead of, 4 commits behind objectscript/GitHubAPI:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

27c732b · Sep 24, 2022

History

39 Commits
Sep 24, 2022
Jun 29, 2021
Jun 26, 2020
Jun 26, 2020
Jun 26, 2020
Jan 28, 2022
Jun 26, 2020
Dec 28, 2015
Sep 24, 2022
Jan 28, 2022
Jun 26, 2020
Sep 24, 2022
Dec 28, 2015

Repository files navigation

GitHubAPI

Quality Gate Status

Github API for InterSystems Data Platforms

Installation

Import into any namespace and compile.

Usage

First create api object to interact with GitHub API (provide valid GitHub user and pass):

Set api = ##class(GitHub.API).%New("user","pass")

After that you can query some GitHub APIs. For example to get info about all public repos in organization:

Do api.GetOrgRepos("intersystems-ru","public",.repos)

All availible API calls are listed in class documentation of GitHub.API class.

Some workflows to automate work with GitHub are availible in GitHub.Workflows class.

Mirroring

  1. Create repos.json file:
{
    "mirrors": [{
        "from": "intersystems-ru",  // owners: user or organization
        "to": "intersystems-community",
        "org": 1,                   // 1: if you want to mirror in organization owner. 0: if user owner.
        "repos": [
            "GitHubAPI"             // just repos name f.e. 'GitHubAPI'
        ]
    }, {
        "from": "user1",
        "to": "user2",
        "org": 0,
        "repos": [
            "repo1",
            "repo2"
        ]
    }]
}
  1. Set repos.json location in param, class GitHub.API. Parameter Directory = "C:/temp/mirror/"
  2. Set api = ##class(GitHub.API).%New("user","pass")
  3. Do api.Mirror()

Task

Create task:

  • Task Type = RunLegacyTask
  • ExecuteCode = Do ##class(GitHub.API).UpdateMirrors()
  • Choose the right time to start the task

Some API method I want is not availible. What do I do?

Everyone is welcome to add methods or wokflows via pull requests.

About

Github API for InterSystems Caché

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ObjectScript 95.8%
  • Dockerfile 2.3%
  • Shell 1.9%