AlphaAlpha Docs

Git Hub Integration

GitHub repository integration for projects

Get GitHub authorization URL

GET
/hr/github/authorize
AuthorizationBearer <token>

In: header

Query Parameters

projectId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/github/authorize?projectId=string"
{
  "url": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

GitHub OAuth callback

GET
/hr/github/callback
AuthorizationBearer <token>

In: header

Query Parameters

code*string
state*string

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/github/callback?code=string&state=string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Disconnect GitHub account

DELETE
/hr/github/disconnect
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/hr/github/disconnect"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get recent commits for a project

GET
/hr/github/projects/{projectId}/commits
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Query Parameters

limit?integer
Default30
Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/github/projects/string/commits"
[
  {
    "authorAvatarUrl": "string",
    "authorName": "string",
    "date": "2019-08-24T14:15:22Z",
    "linkedTaskCode": "string",
    "message": "string",
    "repositoryFullName": "string",
    "sha": "string",
    "url": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

List linked repositories for a project

GET
/hr/github/projects/{projectId}/repos
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/github/projects/string/repos"
[
  {
    "created": "2019-08-24T14:15:22Z",
    "defaultBranch": "string",
    "id": "string",
    "linkedBy": "string",
    "repositoryFullName": "string",
    "repositoryUrl": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
POST
/hr/github/projects/{projectId}/repos
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "http://localhost:18080/api/v1/hr/github/projects/string/repos" \  -H "Content-Type: application/json" \  -d '{    "repositoryFullName": "string",    "repositoryId": 0,    "repositoryUrl": "string"  }'
{
  "created": "2019-08-24T14:15:22Z",
  "defaultBranch": "string",
  "id": "string",
  "linkedBy": "string",
  "repositoryFullName": "string",
  "repositoryUrl": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
DELETE
/hr/github/projects/{projectId}/repos/{repoFullName}
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string
repoFullName*string

Response Body

application/json

application/json

application/json

curl -X DELETE "http://localhost:18080/api/v1/hr/github/projects/string/repos/string"
Empty
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

List user's GitHub repositories

GET
/hr/github/repos
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/github/repos"
[
  {
    "defaultBranch": "string",
    "description": "string",
    "fullName": "string",
    "id": 0,
    "isPrivate": true,
    "language": "string",
    "name": "string",
    "url": "string"
  }
]
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}

Get GitHub connection status

GET
/hr/github/status
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "http://localhost:18080/api/v1/hr/github/status"
{
  "connected": true,
  "githubAvatarUrl": "string",
  "githubUsername": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}
{
  "detail": "string",
  "time": "2019-08-24T14:15:22Z",
  "title": "string"
}