Repository

Create an issue in a repository

post

Creates a new GitHub issue in the specified repository. Supports setting labels, assignees, and milestones. Useful for automated issue creation from CI/CD pipelines or error tracking systems.

Authorizations
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

titlestringRequired

Issue title

bodystringRequired

Issue body/description in markdown format

labelsstring[]Optional

Labels to apply to the issue

assigneesstring[]Optional

GitHub usernames to assign to the issue

milestonestringOptional

Milestone number or title

Responses
201
The issue has been successfully created
application/json
post
POST /sfp/api/repository/issues HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 118

{
  "repositoryIdentifier": "text",
  "title": "text",
  "body": "text",
  "labels": [
    "text"
  ],
  "assignees": [
    "text"
  ],
  "milestone": "text"
}
201

The issue has been successfully created

{
  "id": 1,
  "number": 1,
  "html_url": "text",
  "state": "open",
  "title": "text",
  "body": "text",
  "labels": [
    "text"
  ],
  "assignees": [
    "text"
  ]
}

Create a webhook for a repository

post

Creates a GitHub webhook for the specified repository to enable real-time event notifications. The webhook listens for a predefined set of events relevant to the SFP application: - pull_request: Tracks PR creation, updates, merges, and closures - pull_request_review: Monitors review submissions and changes - pull_request_review_comment: Captures inline code review comments - issue_comment: Tracks comments on both issues and pull requests - issues: Monitors issue lifecycle events

A webhook secret is automatically generated if one doesn't exist for the repository. This secret is used to verify the authenticity of incoming webhook payloads. The secret is only returned in the response if it was newly generated.

Requires owner role to create webhooks.
Authorizations
Body
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: octocat/hello-world
webhookUrlstringRequired

URL where GitHub should send webhook events

Example: https://example.com/webhook
Responses
201
The webhook has been successfully created
application/json
post
POST /sfp/api/repository/webhook/create HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "repositoryIdentifier": "octocat/hello-world",
  "webhookUrl": "https://example.com/webhook"
}
201

The webhook has been successfully created

{
  "id": 1,
  "url": "text",
  "events": [
    "text"
  ],
  "active": true,
  "secret": "text"
}

Update a webhook for a repository

post

Updates an existing GitHub webhook's URL for the specified repository. The webhook must already exist for this repository. The events that trigger the webhook and its active status remain unchanged - only the URL is updated.

This is useful when changing the webhook endpoint URL (e.g., after infrastructure changes) without needing to recreate the entire webhook configuration.

The existing webhook secret is reused for security continuity. Requires owner role to update webhooks.
Authorizations
Body
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

Example: octocat/hello-world
webhookUrlstringRequired

URL where GitHub should send webhook events

Example: https://example.com/webhook
Responses
200
The webhook has been successfully updated
application/json
post
POST /sfp/api/repository/webhook/update HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "repositoryIdentifier": "octocat/hello-world",
  "webhookUrl": "https://example.com/webhook"
}
200

The webhook has been successfully updated

{
  "id": 1,
  "url": "text",
  "events": [
    "text"
  ],
  "active": true
}

Create a check run for a repository

post

Creates a GitHub check run on a commit with optional code annotations. Useful for reporting CI/CD results, code quality checks, or custom validations. Annotations can highlight specific lines in files with issues.

Authorizations
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

shastringRequired

Commit SHA to create the check for. For PRs, this should be the head commit SHA.

Example: 6dcb09b5b57875f334f61aebed695e2e4193db5e
pull_numbernumberOptional

Pull request number. If provided, the check will be associated with this PR.

Example: 123
titlestringRequired

Title of the check run

Example: sfp Metadata Duplicate Check
summarystringRequired

Summary of the check results

textstringOptional

Additional details about the check run

details_urlstringOptional

Details URL that will appear in the GitHub UI

Example: https://your-server.com/check-details/123
Responses
201
The check run has been successfully created
application/json
post
POST /sfp/api/repository/checks HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 347

{
  "repositoryIdentifier": "text",
  "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "pull_number": 123,
  "title": "sfp Metadata Duplicate Check",
  "summary": "text",
  "text": "text",
  "annotations": [
    {
      "path": "text",
      "start_line": 1,
      "end_line": 1,
      "annotation_level": "warning",
      "message": "text",
      "title": "text"
    }
  ],
  "details_url": "https://your-server.com/check-details/123"
}
201

The check run has been successfully created

{
  "id": 1,
  "html_url": "text",
  "conclusion": "success",
  "status": "completed"
}

Create a pull request in a repository

post

Creates a new pull request between two branches. Supports draft pull requests. The source branch must have commits ahead of the target branch. Useful for automated PR creation in CI/CD workflows.

Authorizations
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

Example: octocat/Hello-World
sourceBranchstringRequired

The source branch containing the changes

Example: feature-branch
targetBranchstringRequired

The target branch to merge changes into

Example: main
titlestringRequired

Title of the pull request

Example: Add new feature
descriptionstringOptional

Description of the pull request in markdown format

Example: This PR implements the following: - Feature A - Feature B
draftbooleanOptional

Whether to create as a draft pull request

Default: false
Responses
201
The pull request has been successfully created
application/json
post
POST /sfp/api/repository/pull-requests HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 216

{
  "repositoryIdentifier": "octocat/Hello-World",
  "sourceBranch": "feature-branch",
  "targetBranch": "main",
  "title": "Add new feature",
  "description": "This PR implements the following:\n- Feature A\n- Feature B",
  "draft": false
}
201

The pull request has been successfully created

{
  "id": 1,
  "number": 1,
  "html_url": "text",
  "state": "open",
  "title": "text",
  "body": "text",
  "draft": true
}

Close an issue

post

Closes a GitHub issue with an optional comment. This is a convenience endpoint that updates the issue state to closed and optionally adds a closing comment in a single operation.

Authorizations
Path parameters
issue_numbernumberRequired
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

commentstringOptional

Optional comment to add when closing the issue

Responses
200
The issue has been successfully closed
application/json
post
POST /sfp/api/repository/issues/{issue_number}/close HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 48

{
  "repositoryIdentifier": "text",
  "comment": "text"
}
200

The issue has been successfully closed

{
  "id": 1,
  "number": 1,
  "state": "closed"
}

Handle incoming webhook events

post

Processes incoming GitHub webhook events. This is the endpoint that GitHub calls when events occur in the repository. The endpoint: - Validates the webhook signature using the repository's secret - Extracts event type and delivery ID from GitHub headers - Routes the event to appropriate handlers based on event type - Processes events asynchronously to avoid blocking GitHub

Supported events are automatically handled by registered handlers. This is a public endpoint as it needs to be accessible by GitHub's webhook delivery system. Authentication is performed via webhook signature validation.
Header parameters
x-github-eventstringRequired
x-github-deliverystringRequired
x-hub-signature-256stringRequired
Responses
200
The webhook event has been processed successfully
post
POST /sfp/api/repository/webhook HTTP/1.1
Host: 
x-github-event: text
x-github-delivery: text
x-hub-signature-256: text
Accept: */*
200

The webhook event has been processed successfully

No content

Get webhooks for a repository

get

Retrieves all webhooks configured for the specified repository. Returns detailed information about each webhook including: - GitHub webhook ID and internal ID - Webhook URL endpoint - Events that trigger the webhook - Active status - Creation and last update timestamps

This endpoint helps verify webhook configuration and troubleshoot webhook delivery issues. Requires owner role to view webhook configurations.
Authorizations
Path parameters
repositoryIdentifierstringRequired
Responses
200
List of webhooks for the repository
application/json
get
GET /sfp/api/repository/webhook/{repositoryIdentifier} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

List of webhooks for the repository

[]

Reopen a pull request

patch

Reopens a previously closed pull request. The PR must not have been merged. All previous history including comments and reviews is preserved.

Authorizations
Path parameters
pull_numbernumberRequired
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

Example: flxbl-io/sfp-core
Responses
200
The pull request has been successfully reopened
application/json
patch
PATCH /sfp/api/repository/pull-requests/{pull_number}/reopen HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "repositoryIdentifier": "flxbl-io/sfp-core"
}
200

The pull request has been successfully reopened

{
  "id": 1,
  "number": 1,
  "state": "open"
}

Delete a webhook for a repository

delete

Permanently deletes a webhook for the specified repository. This operation: - Removes the webhook from GitHub, stopping all event deliveries - Deletes the webhook metadata from the SFP database - Does not delete the webhook secret (which may be reused if webhook is recreated)

If no webhook exists for the repository, the operation succeeds silently. This is useful for cleanup operations. Requires owner role to delete webhooks.
Authorizations
Path parameters
repositoryIdentifierstringRequired
Responses
204
The webhook has been successfully deleted
delete
DELETE /sfp/api/repository/webhook/{repositoryIdentifier} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
204

The webhook has been successfully deleted

No content

List open pull requests in a repository

get

Lists pull requests with optional filtering by username and state. Supports pagination. Can filter PRs created by or assigned to a specific user. Returns basic PR information including title, state, and branch details.

Authorizations
Query parameters
repositoryIdentifierstringRequired

Repository identifier in format owner/repo

usernamestringOptional

Filter pull requests by GitHub username

statestring · enumOptional

State of pull requests to return (default: open)

Possible values:
pagenumberOptional

Page number (1-based, default: 1)

per_pagenumberOptional

Number of results per page (default: 30, max: 100)

Responses
200
List of pull requests
application/json
get
GET /sfp/api/repository/pull-requests?repositoryIdentifier=text HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

List of pull requests

[]

Update an existing issue

patch

Updates an existing GitHub issue including title, body, state, labels, assignees, and milestone. Can be used to close issues, update their status, or modify metadata. Only the fields provided in the request body will be updated.

Authorizations
Path parameters
issue_numbernumberRequired
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

titlestringOptional

New title for the issue

bodystringOptional

New body/description in markdown format

statestring · enumOptional

New state for the issue

Possible values:
labelsstring[]Optional

New labels for the issue

assigneesstring[]Optional

GitHub usernames to assign to the issue

milestonestringOptional

New milestone number or title

Responses
200
The issue has been successfully updated
application/json
patch
PATCH /sfp/api/repository/issues/{issue_number} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "repositoryIdentifier": "text",
  "title": "text",
  "body": "text",
  "state": "open",
  "labels": [
    "text"
  ],
  "assignees": [
    "text"
  ],
  "milestone": "text"
}
200

The issue has been successfully updated

{
  "id": 1,
  "number": 1,
  "html_url": "text",
  "state": "open",
  "title": "text",
  "body": "text",
  "labels": [
    "text"
  ],
  "assignees": [
    "text"
  ]
}

Close a pull request

patch

Closes an open pull request without merging. The PR can be reopened later if needed. This action preserves all PR history including comments and reviews.

Authorizations
Path parameters
pull_numbernumberRequired
Body
repositoryIdentifierstringRequired

Repository identifier in the format owner/repo

Example: flxbl-io/sfp-core
Responses
200
The pull request has been successfully closed
application/json
patch
PATCH /sfp/api/repository/pull-requests/{pull_number}/close HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 44

{
  "repositoryIdentifier": "flxbl-io/sfp-core"
}
200

The pull request has been successfully closed

{
  "id": 1,
  "number": 1,
  "state": "closed"
}

Last updated