Review

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
PATCH
GET
POST
PATCH
DELETE
GET
PATCH
GET
PATCH
POST
DELETE
GET
POST
DELETE
POST
DELETE
GET
POST
DELETE

List all review hog blind spots

List the review-hog-blind-spots-* skills visible to the requesting user — the canonical skill plus the customs they authored — flagging the one active for them. The canonical skill is auto-seeded active on the first read; a custom skill the user has not selected shows as inactive.

Required API key scopes

llm_skill:read

Example request

GET /api/projects/:project_id/review_hog/blind_spots
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/blind_spots/

Example response

Status 200 Every blind-spots skill on this project, flagging the one active for the user.
RESPONSE
{
"skill_name": "string",
"active": true,
"description": "string",
"body": "string"
}

Update review hog blind spots

Make a review-hog-blind-spots-* skill the single sweep that runs on the requesting user's PR reviews, switching the user's other blind-spots skills off in the same call. Only skills visible to the user — the canonical plus the customs they authored — can be selected; anything else 404s. Upserts the per-user config row, so selecting a freshly authored custom skill works in one call.

Required API key scopes

llm_skill:write

Path parameters

  • skill_name
    string

Request parameters

  • active
    boolean

Response


Example request

PATCH /api/projects/:project_id/review_hog/blind_spots/:skill_name
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/blind_spots/:skill_name/\
-d active="boolean"

Example response

Status 200 The blind-spots skill now active for the user.
RESPONSE
{
"skill_name": "string",
"active": true,
"description": "string",
"body": "string"
}
Status 400 Not a blind-spots skill, or `active` was not true.
Status 404 No such blind-spots skill visible to the user on this project.

List all review hog installation claims

Which repositories of each connected GitHub installation this project reviews.

Project members can read the claims. Only project admins can change them, and every change goes to the activity log. The project settings response lists every connected installation, also the ones without a claim.

Required API key scopes

review_hog:read

Example request

GET /api/projects/:project_id/review_hog/installation_claims
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/installation_claims/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"scope": "all",
"account_name": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}

Create review hog installation claims

Choose which repositories of a connected GitHub installation this project reviews.

Required API key scopes

review_hog:write

Request parameters

  • installation_id
    string
  • scope

Response


Example request

POST /api/projects/:project_id/review_hog/installation_claims
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/installation_claims/\
-d installation_id="string",\
-d scope=undefined

Example response

Status 201 The claim was saved.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"scope": "all",
"account_name": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}
Status 400 The rules forbid it.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}
Status 409 Another project already takes all repositories of the installation.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}

Update review hog installation claims

Switch between all repositories and only selected repositories. Switching to selected removes the exceptions of the repositories that leave this project. Personal choices stay.

Required API key scopes

review_hog:write

Path parameters

  • id
    string

Request parameters

  • scope

Response


Example request

PATCH /api/projects/:project_id/review_hog/installation_claims/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/installation_claims/:id/\
-d scope=undefined

Example response

Status 200 The claim was changed.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"scope": "all",
"account_name": "string",
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}
Status 409 Another project already takes all repositories of the installation.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}

Delete review hog installation claims

Remove the claim, so this project reviews no repository of the installation. Its selected repositories and exceptions there are removed too. Personal choices stay.

Required API key scopes

review_hog:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/review_hog/installation_claims/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/installation_claims/:id/

Example response

Status 204 The claim and this project's repository settings there are gone.

List all review hog perspectives

List the review-hog-perspective-* skills visible to the requesting user — the canonical perspectives plus the customs they authored — joined with their enable state. The 3 canonical perspectives are auto-seeded enabled on the first read; a custom perspective the user has not switched on shows as disabled.

Required API key scopes

llm_skill:read

Example request

GET /api/projects/:project_id/review_hog/perspectives
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/perspectives/

Example response

Status 200 Every review perspective on this project with the user's enable state, by skill name.
RESPONSE
{
"skill_name": "string",
"enabled": true,
"description": "string",
"body": "string"
}

Update review hog perspectives

Toggle whether a review-hog-perspective-* skill runs on the requesting user's PR reviews. Only skills visible to the user — the canonicals plus the customs they authored — can be toggled; anything else 404s. Upserts the per-user config row, so enabling a freshly authored custom perspective works in one call. Rejected if it would leave the user with no enabled perspective.

Required API key scopes

llm_skill:write

Path parameters

  • skill_name
    string

Request parameters

  • enabled
    boolean

Response


Example request

PATCH /api/projects/:project_id/review_hog/perspectives/:skill_name
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/perspectives/:skill_name/\
-d enabled="boolean"

Example response

Status 200 The perspective's updated enable state.
RESPONSE
{
"skill_name": "string",
"enabled": true,
"description": "string",
"body": "string"
}
Status 400 Not a perspective skill, or disabling the user's last enabled one.
Status 404 No such perspective skill visible to the user on this project.

Retrieve review hog project settings

The project rule for automatic Standard reviews, bot pull requests, the Deep review defaults, and the connected GitHub installations.

Response


Example request

GET /api/projects/:project_id/review_hog/project_settings
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/project_settings/

Example response

Status 200
RESPONSE
{
"flash_for": "everyone",
"bot_prs": "skip",
"urgency_threshold": "consider",
"celebrate_clean_reviews": true,
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"installations": [
{
"installation_id": "string",
"account_name": "string",
"connected_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"claim_id": "6ed32748-64af-4d95-94ea-a78b6397033c",
"scope": "all",
"all_taken_by_project": {
"id": 0,
"name": "string"
}
}
],
"can_edit": true
}

Update review hog project settings

Partially update the project rule. Only the provided fields change. Project admins only.

Request parameters

  • flash_for
  • bot_prs
  • urgency_threshold
  • celebrate_clean_reviews
    boolean

Response


Example request

PATCH /api/projects/:project_id/review_hog/project_settings
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X PATCH \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/project_settings/\
-d flash_for=undefined

Example response

Status 200 The updated rule.
RESPONSE
{
"flash_for": "everyone",
"bot_prs": "skip",
"urgency_threshold": "consider",
"celebrate_clean_reviews": true,
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"installations": [
{
"installation_id": "string",
"account_name": "string",
"connected_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"claim_id": "6ed32748-64af-4d95-94ea-a78b6397033c",
"scope": "all",
"all_taken_by_project": {
"id": 0,
"name": "string"
}
}
],
"can_edit": true
}
Status 400 Invalid field value.
Status 403 Only project admins can change the rule.

Create review hog project settings people

Add a project member to the project rule's 'listed' or 'excepted' list. Project admins only.

Required API key scopes

review_hog:write

Request parameters

  • user_id
    integer
  • kind

Response


Example request

POST /api/projects/:project_id/review_hog/project_settings/people
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/project_settings/people/\
-d user_id="integer",\
-d kind=undefined

Example response

Status 200 Already on that list.
RESPONSE
{
"flash_for": "everyone",
"bot_prs": "skip",
"urgency_threshold": "consider",
"celebrate_clean_reviews": true,
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"installations": [
{
"installation_id": "string",
"account_name": "string",
"connected_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"claim_id": "6ed32748-64af-4d95-94ea-a78b6397033c",
"scope": "all",
"all_taken_by_project": {
"id": 0,
"name": "string"
}
}
],
"can_edit": true
}
Status 201 The person was added.
RESPONSE
{
"flash_for": "everyone",
"bot_prs": "skip",
"urgency_threshold": "consider",
"celebrate_clean_reviews": true,
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"installations": [
{
"installation_id": "string",
"account_name": "string",
"connected_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"claim_id": "6ed32748-64af-4d95-94ea-a78b6397033c",
"scope": "all",
"all_taken_by_project": {
"id": 0,
"name": "string"
}
}
],
"can_edit": true
}
Status 400 The user is not an active member of this project's organization.

Delete review hog project settings people

Remove one entry from the project rule's 'listed' or 'excepted' list. Project admins only.

Required API key scopes

review_hog:write

Path parameters

  • person_id
    string

Response


Example request

DELETE /api/projects/:project_id/review_hog/project_settings/people/:person_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/project_settings/people/:person_id/

Example response

Status 200 The person was removed.
RESPONSE
{
"flash_for": "everyone",
"bot_prs": "skip",
"urgency_threshold": "consider",
"celebrate_clean_reviews": true,
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"installations": [
{
"installation_id": "string",
"account_name": "string",
"connected_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"claim_id": "6ed32748-64af-4d95-94ea-a78b6397033c",
"scope": "all",
"all_taken_by_project": {
"id": 0,
"name": "string"
}
}
],
"can_edit": true
}
Status 404 No such list entry.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}

List all review hog repositories

The repositories this project has settings for: selected repositories and repository exceptions.

Project members can read them. Only project admins can change them, and every change goes to the activity log. A repository has settings in one project at most.

Required API key scopes

review_hog:read

Example request

GET /api/projects/:project_id/review_hog/repositories
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repositories/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"selected": true,
"flash_for": "everyone",
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}

Create review hog repositories

Include a repository into this project, remove it, or set or clear its exception. Only the provided fields change. Including a repository that another project's 'all repositories' claim covers takes it from that project; the response names it.

Required API key scopes

review_hog:write

Request parameters

  • installation_id
    string
  • full_name
    string
  • github_repo_id
    integer
  • selected
    boolean
  • flash_for

Response


Example request

POST /api/projects/:project_id/review_hog/repositories
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repositories/\
-d installation_id="string",\
-d full_name="string"

Example response

Status 200 The saved settings.
RESPONSE
{
"repository": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"selected": true,
"flash_for": "everyone",
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
},
"taken_from_project": {
"id": 0,
"name": "string"
}
}
Status 400 The rules forbid the write.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}
Status 409 Another project already has settings for the repository.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}

Delete review hog repositories

Remove the repository from this project and clear its exception and lists. With an 'all repositories' claim the repository stays in the project and follows the project rule.

Required API key scopes

review_hog:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/review_hog/repositories/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repositories/:id/

Example response

Status 204 No response body

Create review hog repositories people

Add a project member to the 'listed' or 'excepted' list of the repository exception.

Required API key scopes

review_hog:write

Path parameters

  • id
    string

Request parameters

  • user_id
    integer
  • kind

Response


Example request

POST /api/projects/:project_id/review_hog/repositories/:id/people
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repositories/:id/people/\
-d user_id="integer",\
-d kind=undefined

Example response

Status 200 The person was already on it.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"selected": true,
"flash_for": "everyone",
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}
Status 201 The person was added.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"selected": true,
"flash_for": "everyone",
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}
Status 400 The user is not an active member of this project's organization.

Delete review hog repositories people

Remove one entry from the 'listed' or 'excepted' list of the repository exception.

Required API key scopes

review_hog:write

Path parameters

  • id
    string
  • person_id
    string

Response


Example request

DELETE /api/projects/:project_id/review_hog/repositories/:id/people/:person_id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repositories/:id/people/:person_id/

Example response

Status 200 The person was removed.
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"selected": true,
"flash_for": "everyone",
"people": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"kind": "listed"
}
],
"created_by": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "user@example.com",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "engineering"
},
"created_at": "2019-08-24T14:15:22Z"
}
Status 404 No such list entry.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}

List all review hog repository choices

The requesting user's own automatic review choices for repositories of this project.

Any project member can manage their own choices. A choice stores only what differs from what the user inherits, so picking the inherited value clears it.

Required API key scopes

review_hog:read

Example request

GET /api/projects/:project_id/review_hog/repository_choices
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repository_choices/

Example response

Status 200
RESPONSE
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"mode": "flash"
}

Create review hog repository choices

Set the requesting user's own automatic review for their pull requests in one repository. It wins over their default and over the repository and project rules.

Required API key scopes

review_hog:write

Request parameters

  • installation_id
    string
  • full_name
    string
  • github_repo_id
    integer
  • mode

Response


Example request

POST /api/projects/:project_id/review_hog/repository_choices
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repository_choices/\
-d installation_id="string",\
-d full_name="string",\
-d mode=undefined

Example response

Status 200 Saved.
RESPONSE
{
"choice": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"installation_id": "string",
"github_repo_id": 0,
"full_name": "string",
"mode": "flash"
},
"my_result": {
"flash": true,
"reason": "own_repository_choice"
}
}
Status 400 This project does not review the repository.
RESPONSE
{
"error": "string",
"conflicting_project": {
"id": 0,
"name": "string"
}
}

Delete review hog repository choices

Clear the requesting user's own choice for one repository, so their default applies again.

Required API key scopes

review_hog:write

Path parameters

  • id
    string

Example request

DELETE /api/projects/:project_id/review_hog/repository_choices/:id
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl -X DELETE \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/review_hog/repository_choices/:id/

Example response

Status 204 No response body