Giter VIP home page Giter VIP logo

Comments (6)

SiviP-Glossai avatar SiviP-Glossai commented on June 1, 2024 2

Works! :)
Toda Raba

from gitstream.

vim-zz avatar vim-zz commented on June 1, 2024

Hi @SiviP-Glossai, did you add a rules file to your repo?

  1. Verify that you have the default at .cm/gitstream.cm
  2. Check it is in your default branch (usually main or master)
  3. If both (1) abd (2) are ok - please share the file here so we can take a look

from gitstream.

SiviP-Glossai avatar SiviP-Glossai commented on June 1, 2024

Hi @vim-zz thanks for the quick response,

  1. Done
  2. Done

from main branch:

.cm/gitstream.cm:

# -*- mode: yaml -*-

manifest:
  version: 1.0

automations:
  estimated_time_to_review:
    if:
      - true
    run:
      - action: add-label@v1
        args:
          label: "{{ calc.etr }} min review"
          color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}

  safe_changes:
    if:
      - {{ is.formatting or is.docs  }}
    run: 
      - action: add-label@v1
        args:
          label: 'safe-changes'
      - action: approve@v1

calc:
  etr: {{ branch | estimatedReviewTime }}
is:
  formatting: {{ source.diff.files | isFormattingChange }}
  docs: {{ files | allDocs }}

.github/workflows/gitstream.yml

# Code generated by gitStream GitHub app - DO NOT EDIT

name: gitStream workflow automation

on:
  workflow_dispatch:
    inputs:
      client_payload:
          description: The Client payload
          required: true
      full_repository:
          description: the repository name include the owner in `owner/repo_name` format
          required: true
      head_ref:
          description: the head sha
          required: true
      base_ref:
          description: the base ref 
          required: true
      installation_id:
          description: the installation id
          required: false
      resolver_url:
          description: the resolver url to pass results to
          required: true
      resolver_token:
          description: Optional resolver token for resolver service
          required: false
          default: ''

jobs:
  gitStream:
    timeout-minutes: 5
    # uncomment this condition, if you dont want any automation on dependabot PRs
    # if: github.actor != 'dependabot[bot]'
    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 }}

from gitstream.

vim-zz avatar vim-zz commented on June 1, 2024

@SiviP-Glossai can you share the content of .git/hooks/post-checkout

from gitstream.

SiviP-Glossai avatar SiviP-Glossai commented on June 1, 2024
#!/usr/bin/env sh
#!/usr/bin/env bash
# File generated by pre-commit: https://pre-commit.com
# ID: 138fd403232d2ddd5efb44317e38bf03

# start templated
INSTALL_PYTHON='c:\users\sivan\appdata\local\programs\python\python38\python.exe'
ARGS=(hook-impl '--config=setup\git-hooks\.pre-commit-config.yaml' --hook-type=post-checkout)
# end templated

HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")

if [ -x "$INSTALL_PYTHON" ]; then
    exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}"
elif command -v pre-commit > /dev/null; then
    exec pre-commit "${ARGS[@]}"
else
    echo '`pre-commit` not found.  Did you forget to activate your virtualenv?' 1>&2
    exit 1
fi

And also: setup\git-hooks\.pre-commit-config.yaml

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
  rev: v4.3.0
  hooks:
  - id: check-added-large-files
    name: Block Large Files (>1MB)
    description: Block large files, unless they are LFS
    args: [--maxkb=1000]
- repo: https://github.com/PyCQA/autoflake
  rev: v1.7.6
  hooks:
  - id: autoflake
    args: ["--config", "setup.cfg"]
- repo: https://github.com/pycqa/isort
  rev: 5.10.1
  hooks:
  - id: isort
    args: ["--filter-files"]
- repo: https://github.com/psf/black
  rev: 22.10.0
  hooks:
  - id: black

from gitstream.

vim-zz avatar vim-zz commented on June 1, 2024

Support for GitLFS was added, @SiviP-Glossai please re-try

from gitstream.

Related Issues (20)

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.