Giter Club home page Giter Club logo

gitstream-github-action's People

Contributors

eladkohavi avatar mishakav avatar saharavishag avatar shakedzrihen avatar tvthatsme avatar vim-zz avatar yeelali14 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gitstream-github-action's Issues

Node.js 16 actions are deprecated

Seeing this on the workflow runs: Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/github-script@v6. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Gitstream github action is failing

Hey,

We've been using the Gitstream GitHub Action, and recently, it's been failing consistently in every run.
Initially, we were on version 1.0.3, and despite upgrading to v1.0.13, the issue persists.

The error:

Status: Downloaded newer image for gitstream/rules-engine:latest
docker.io/gitstream/rules-engine:latest

> [email protected] start
> node src/app.js

/node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js:25
var fetch = _interopDefault(require('node-fetch'));
                            ^

Error [ERR_REQUIRE_ESM]: require() of ES Module /node_modules/node-fetch/src/index.js from /node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js not supported.
Instead change the require of index.js in /node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/node_modules/@linearb/gitstream-core/dist/gitstream-core.cjs.development.js:25:29)
    at Object.<anonymous> (/node_modules/@linearb/gitstream-core/dist/index.js:7:20)
    at async Promise.all (index 0) {
  code: 'ERR_REQUIRE_ESM'
}
Error: Process completed with exit code 1.

Our action setup mirrors the documentation:

jobs:
  gitStream:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    name: gitStream workflow automation
    steps:
      - name: Evaluate Rules
        uses: linear-b/[email protected]
        id: rules-engine
        with:
          full_repository: ${{ github.event.inputs.full_repository }}
          head_ref: ${{ github.event.inputs.head_ref }}
          base_ref: ${{ github.event.inputs.base_ref }}
          client_payload: ${{ github.event.inputs.client_payload }}
          installation_id: ${{ github.event.inputs.installation_id }}
          resolver_url: ${{ github.event.inputs.resolver_url }}
          resolver_token: ${{ github.event.inputs.resolver_token }}

Suggestion for gitstream GitHub action

Hello,

We've been using the gitstream GitHub action, and it has been working well for us. I wanted to suggest a couple of enhancements that could make it even more useful for our specific needs:

  1. Conditional execution: It would be beneficial to have the ability to pass an option or condition to the action, so it doesn't run on every event. For instance, when someone adds a comment, the action currently runs. It would be great to control this behavior using a condition like this oneif: !${{ github.event.issue.pull_request }}to make the action execute only when a new commit occurs.

  1. Email notification on failure only: Currently, the action sends an email notification each time gitstream runs. It would be really helpful if there's an option to receive an email only when the gitstream action itself fails, rather than for every run. This way, we can be promptly notified of any issues with the action specifically.

    The default behavior is to send an email only when a workflow failed, It will be great if it will be the same.
    image
    https://docs.github.com/en/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#github-actions-notification-options

We believe these additions would significantly improve the flexibility and usability of the gitstream action for our team.

Thank you for considering our suggestions!

"bad substitution" error running action

I don't know how much I can paste here, as the error comes from runs in a private repo.

We're invoking it like

  gitStream:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    name: gitStream workflow automation
    steps:
      - name: Evaluate Rules
        uses: linear-b/gitstream-github-action@v1
        id: rules-engine
        with:
          full_repository: ${{ github.event.inputs.full_repository }}
          head_ref: ${{ github.event.inputs.head_ref }}
          base_ref: ${{ github.event.inputs.base_ref }}
          client_payload: ${{ github.event.inputs.client_payload }}
          installation_id: ${{ github.event.inputs.installation_id }}
          resolver_url: ${{ github.event.inputs.resolver_url }}
          resolver_token: ${{ github.event.inputs.resolver_token }}

(I think this is boilerplate from your documentation.)

The error is coming from this step in the action:

  env_file=env.user
  touch $env_file
  for var in $(env | cut -d "=" -f 1); do
    value="${!var}"
    echo "$var=$value" >> "$env_file"
  done
  docker pull gitstream/rules-engine:latest
  echo "docker-pull-duration=$SECONDS" >> $GITHUB_OUTPUT
  SECONDS=0
  docker run --env-file $env_file -v $(pwd)/gitstream:/code -e USE_CACHE= -e HEAD_REF=... -e BASE_REF=main -e CLIENT_PAYLOAD="{...}"  -e RULES_RESOLVER_URL=https://qembo8hwr6.execute-api.us-west-1.amazonaws.com/prod/api/v1/gitstream/resolve -e RULES_RESOLVER_TOKEN=... -e DEBUG_MODE= gitstream/rules-engine
  echo "docker-run-duration=$SECONDS" >> $GITHUB_OUTPUT
  echo "action-run-duration=$(($EPOCHSECONDS - 1686844604))" >> $GITHUB_OUTPUT

where the value of CLIENT_PASSWORD is very large (10365 characters).

Please let me know if there is any other information I can provide.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.