Skip to content

gitstream pr context variable doesn't contain all pr checks #778

Description

@dorongutman

Describe the bug

In my PR there are checks showing the status of external CI systems runs, like the docker build, or whether tests passed or failed.
However, when I iterate over pr.checks in gitstream these statuses don't show.

To Reproduce

See full repro in dorongutman/reproduce-gitstream-main#2

I manually created a status check with:

curl -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  https://api.github.com/repos/dorongutman/reproduce-gitstream-main/statuses/e87a06aa1a29e94e89876248dd1e644fc6aadba8 \
  -d '{
    "state": "success",
    "target_url": "https://example.com",
    "description": "External check running",
    "context": "my-external-service"
  }'

and I used this gitstream.cm file to dump the contents of pr.checks (I tried the entire pr object and also the entire variable contexts in the playground - same thing):

# -*- mode: yaml -*-

manifest:
  version: 1.0
automations:
  dump_checks:
    on:
      - comment_added
    if:
      - true
    run:
      - action: add-comment@v1
        args:
          comment: |
            CHECKS DUMP:
            ```yaml
            {{ pr.checks | dump(2) | indent(12) | safe }}
            ```

Expected behavior

I expect to have all of the checks in pr.checks so I could approve the gitstream check upon successful build and/or tests passing.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions