Skip to content

fetch build status #35

@adabru

Description

@adabru

Sdk version: 4.9.0

I'd like to poll for the status for a specific build to check if a human approved or rejected it. I'm using it for a GitHub commit status.

I've extracted the current REST API from my browser:

http://localhost:4200/projects
http://localhost:4200/builds?projectId=b784e764-633c-449c-8e5e-05481a554c22&take=10&skip=0
http://localhost:4200/test-runs?buildId=1cf53b71-63a5-4cbf-9da2-c258640af2a3

Maybe we can add something like the following:

# new class "Client"
client = VisualRegressionTracker.Client(api_url="xx", api_key="xx")
# new functions get_project and get_build
# new class types.Project (id, name)
my_project: types.Project = client.get_project(project_name="My Project")
my_build: types.Build = client.get_build(project_id=my_project.id, build_name="My Build")
# new property status
print(f"Status of build: {my_build.status}")

https://github.com/Visual-Regression-Tracker/backend/blob/master/src/builds/dto/build.dto.ts
https://github.com/Visual-Regression-Tracker/backend/blob/master/src/projects/dto/project.dto.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions