gitstream icon indicating copy to clipboard operation
gitstream copied to clipboard

GitStream Playground fails on default example

Open eborysko opened this issue 1 year ago • 1 comments

Describe the bug

When I attempt to use GitStream playground, it fails to run on my private and public PR ( regardless of repository)

To Reproduce

Steps to reproduce the behavior: Using Safari or Chrome on MacOS.

  1. Login to playground via https://app.gitstream.cm/playground
  2. Run the default file. The .cm automation file
# -*- mode: yaml -*-
# This example configuration for provides basic automations to get started with gitStream.
# View the gitStream quickstart for more examples: https://docs.gitstream.cm/examples/
manifest:
  version: 1.0


automations:
  # Add a label that indicates how many minutes it will take to review the PR.
  estimated_time_to_review:
    if:
      - true
    run:
      - action: add-label@v1
        args:
          label: "{{ calc.etr }} min review"
          color: {{ colors.red if (calc.etr >= 20) else ( colors.yellow if (calc.etr >= 5) else colors.green ) }}
  # Inform PR authors when they fail to reference Jira tickets in the PR title or description.
  label_missing_jira_info:
    if:
      - {{ not (has.jira_ticket_in_title or has.jira_ticket_in_desc) }}
    run:
      - action: add-label@v1
        args:
          label: "missing-jira"
          color: {{ colors.red }}
      - action: add-comment@v1
        args:
          comment: |
            This PR is missing a Jira ticket reference in the title or description.
            Please add a Jira ticket reference to the title or description of this PR.
  # Post a comment that lists the best experts for the files that were modified.
  explain_code_experts:
    if:
      - true
    run:
      - action: explain-code-experts@v1 
        args:
          gt: 10 


# +----------------------------------------------------------------------------+
# | Custom Expressions                                                         |
# | https://docs.gitstream.cm/how-it-works/#custom-expressions                 |
# +----------------------------------------------------------------------------+

calc:
  etr: {{ branch | estimatedReviewTime }}

has:
  jira_ticket_in_title: {{ pr.title | includes(regex=r/\b[A-Za-z]+-\d+\b/) }}
  jira_ticket_in_desc: {{ pr.description | includes(regex=r/atlassian.net\/browse\/\w{1,}-\d{3,4}/) }}

colors:
  red: 'b60205'
  yellow: 'fbca04'
  green: '0e8a16'

  1. The PR URL (as it contains the repo and PR identifiers)
  • https://github.com/linear-b/gitstream/pull/530 (public)
  • https://github.com/ValidereInc/terraform-github/pull/10 (private)
  1. Following errors always occurs regardless of template. `
  • Error: Cannot read properties of undefined (reading 'reduce')
  • Error: Cannot read properties of null (reading 'login')

Expected behavior

Playground runs and shows sample out put

Screenshots

If applicable, add screenshots to help explain your problem. image

image

Additional context

eborysko avatar Aug 09 '24 21:08 eborysko

Hi @eborysko, We've seen some regression in the playground, and are looking into this issue. I'll update here with an ETA once the issue is identified.

Thanks!

PavelLinearB avatar Aug 11 '24 09:08 PavelLinearB

I am also experiencing the same issue

siaavush avatar Aug 12 '24 13:08 siaavush

Hey @eborysko, We have identified the issues and are currently working on stabling the playground. It should be back by the end of this week

PavelLinearB avatar Aug 27 '24 09:08 PavelLinearB

I'm happy to share that the playground is back and stable! 🎉 Please reach out if you experience any issues

PavelLinearB avatar Aug 28 '24 08:08 PavelLinearB