X Tutup
Skip to content

add client class to retrieve build status#36

Open
adabru wants to merge 1 commit intoVisual-Regression-Tracker:masterfrom
adabru:fetch-builds
Open

add client class to retrieve build status#36
adabru wants to merge 1 commit intoVisual-Regression-Tracker:masterfrom
adabru:fetch-builds

Conversation

@adabru
Copy link

@adabru adabru commented Jan 31, 2026

resolves #35

  • Add two new classes: ClientConfig and Client.
  • Add a new type: Project.
  • Expose two new properties for type Build: status and ciBuildId.

The client is configured with username and email to have enough permission to access a project's builds.

Example usage:

# https://github.com/Cynteract/visual-testing/blob/66b08ddbad5608da97c396090bea498168dff417/github_service/service.py#L83-L90
self.vrt_client = Client(
    ClientConfig(
        apiUrl=config.vrt_api_url,
        project="Cynteract app",
        email=config.vrt_email,
        password=config.vrt_password,
    )
)

# https://github.com/Cynteract/visual-testing/blob/66b08ddbad5608da97c396090bea498168dff417/github_service/service.py#L288-L290
# check if human review is done
build = self.vrt_client.get_build(ciBuildId=version)
if build.status == "passed":
    # all done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fetch build status

1 participant

X Tutup