diff --git a/.cm/gitstream.cm b/.cm/gitstream.cm new file mode 100644 index 0000000..d25c2b8 --- /dev/null +++ b/.cm/gitstream.cm @@ -0,0 +1,17 @@ +# -*- 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') }} + +calc: + etr: {{ branch | estimatedReviewTime }} \ No newline at end of file diff --git a/.github/workflows/gitstream.yml b/.github/workflows/gitstream.yml new file mode 100644 index 0000000..7fa77fa --- /dev/null +++ b/.github/workflows/gitstream.yml @@ -0,0 +1,47 @@ +# 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 + 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 }} diff --git a/SemVer.Action.sln b/SemVer.Action.sln index 97a0087..668aa03 100644 --- a/SemVer.Action.sln +++ b/SemVer.Action.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md .gitmessage = .gitmessage CONTRIBUTING.md = CONTRIBUTING.md + .cm\gitstream.cm = .cm\gitstream.cm EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SemVer.Json", "src\SemVer.Json\SemVer.Json.csproj", "{0DA1B9C2-0F3D-4BE3-99D4-628CCE9E4389}"