Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dbd7bf1
Bump sigstore/cosign-installer from 3.3.0 to 3.5.0 in the actions gro…
dependabot[bot] Apr 11, 2024
af96d80
docs: update all version references to latest versions (#141)
froblesmartin Apr 21, 2024
16c6be3
update ct to v3.11.0 / yamlint to 1.33.0 / yamale to 4.0.4 / add e2e …
cpanato Apr 28, 2024
4f62db1
Bump actions/checkout from 4.1.4 to 4.1.5 in the actions group (#147)
dependabot[bot] May 7, 2024
9c98eaa
Bump actions/checkout in the actions group across 1 directory (#152)
dependabot[bot] Jun 13, 2024
5aa1c68
Bump actions/setup-python from 5.1.0 to 5.1.1 in the actions group (#…
dependabot[bot] Jul 11, 2024
66b7521
Bump the actions group across 1 directory with 3 updates (#164)
dependabot[bot] Jan 20, 2025
ef3072d
use ct 3.12.0 as default (#165)
cpanato Jan 20, 2025
0d28d31
clean up and fix cr action next release (#166)
cpanato Jan 20, 2025
c71c0c7
Bump the actions group across 1 directory with 4 updates (#171)
dependabot[bot] Oct 10, 2025
0941a6b
Fix the broken link for GitHub Help Documentation (#174)
subramani95 Oct 10, 2025
2fe8321
bump ct and yamale version (#178)
cpanato Nov 3, 2025
e27de75
Bump actions/checkout from 4.2.2 to 5.0.0 (#181)
dependabot[bot] Nov 3, 2025
0bfa5c0
Bump actions/setup-python from 5.4.0 to 6.0.0 (#179)
dependabot[bot] Nov 3, 2025
b0c0606
Bump the actions group across 1 directory with 2 updates (#183)
dependabot[bot] Nov 3, 2025
4ea74f6
Use uv instead of python venv (#172)
nikolaik Nov 5, 2025
6ec842c
Bump sigstore/cosign-installer from 3.8.1 to 4.0.0 (#184)
dependabot[bot] Nov 5, 2025
0fe10ff
ci: use Terraform-managed FOSSA workflow
updater-devopsadmin Oct 12, 2023
d5c9659
ci: use Terraform-managed FOSSA workflow
updater-devopsadmin Sep 16, 2024
69ad073
ci: use Terraform-managed FOSSA workflow
updater-devopsadmin Nov 6, 2024
9e068b3
ci: use Terraform-managed gitStream configuration
updater-devopsadmin Dec 8, 2025
367a91e
ci: use Terraform-managed gitStream workflow
updater-devopsadmin Dec 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 162 additions & 0 deletions .cm/gitstream.cm
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# -*- mode: yaml -*-
# This example configuration 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:
# Use LinearB's AI service to review the changes
linearb_ai_review:
on:
- pr_created
- commit
if:
- {{ not pr.draft }}
- {{ not is.bot }}
run:
- action: code-review@v1
args:
approve_on_LGTM: {{ calc.safe_changes }}

# Use LinearB's AI service to add a description to the PR
linearb_ai_description:
on:
- pr_created
- commit
if:
- {{ not pr.draft }}
- {{ not is.bot }}
run:
- action: describe-changes@v1
args:
concat_mode: append

# Add a label indicating how long 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.

# Label PRs where the user indicated Claude Code usage via checkbox
label_claude_code_pr:
on:
- pr_created
- commit
if:
- {{ pr.comments | filter(attr='commenter', term='gitstream-cm') | filter (attr='content', regex=r/\- \[x\] Claude Code Assisted/) | some}}
run:
- action: add-label@v1
args:
label: '🤖 Claude Code'

# Label PRs that contain Claude Code commits (by detecting commit message signature)
label_claude_code_by_commit:
on:
- pr_created
- commit
if:
- {{ source.commits | some(attr='message', regex=r/🤖 Generated with \[Claude Code\]|Co-Authored-By: Claude <noreply@anthropic\.com>/) }}
run:
- action: add-label@v1
args:
label: '🤖 Claude Code'

# Label PRs created with GitHub Copilot assistance via checkbox
label_github_copilot_pr:
on:
- pr_created
- commit
if:
- {{ pr.comments | filter(attr='commenter', term='gitstream-cm') | filter (attr='content', regex=r/\- \[x\] GitHub Copilot Assisted/) | some}}
run:
- action: add-label@v1
args:
label: '🤖 GitHub Copilot'

# Label PRs that contain GitHub Copilot commits (by detecting commit message patterns)
label_github_copilot_by_commit:
on:
- pr_created
- commit
if:
- {{ source.commits | some(attr='message', regex=r/Co-authored-by: github-copilot|Generated by GitHub Copilot|Copilot|with GitHub Copilot/i) }}
run:
- action: add-label@v1
args:
label: '🤖 GitHub Copilot'

# Label Claude Code PRs - Label by Tag
label_claude_code:
if:
- {{ claude_code_tag.pr_title or claude_code_tag.pr_desc or claude_code_tag.pr_comments or claude_code_tag.commit_messages }}
run:
- action: add-label@v1
args:
label: '🤖 Claude Code'

# Label GitHub Copilot PRs - Label by Tag
label_copilot:
if:
- {{ copilot_tag.pr_title or copilot_tag.pr_desc or copilot_tag.pr_comments or copilot_tag.commit_messages }}
run:
- action: add-label@v1
args:
label: '🤖 Copilot'

claude_code_tag:
pr_title: {{ pr.title | includes(regex=r/#claude_code#/) }}
pr_desc: {{pr.description | includes(regex=r/#claude_code#/) }}
pr_comments: {{ pr.comments | map(attr='content') | match(regex=r/#claude_code#/) | some }}
commit_messages: {{ branch.commits.messages | match(regex=r/#claude_code#/) | some }}

copilot_tag:
pr_title: {{ pr.title | includes(regex=r/#copilot#/) }}
pr_desc: {{ pr.description | includes(regex=r/#copilot#/) }}
pr_comments: {{ pr.comments | map(attr='content') | match(regex=r/#copilot#/) | some }}
commit_messages: {{ branch.commits.messages | match(regex=r/#copilot#/) | some }}


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

calc:
etr: {{ branch | estimatedReviewTime }}
safe_changes: {{ is.formatting or is.docs or is.tests or is.image }}

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'

is:
formatting: {{ source.diff.files | isFormattingChange }}
docs: {{ files | allDocs }}
tests: {{ files | allTests }}
image: {{ files | allImages }}
bot: {{ pr.author | match(list=['github-actions', '_bot_', '[bot]', 'dependabot']) | some }}
16 changes: 16 additions & 0 deletions .github/workflows/fossa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Fossa

on:
push:
workflow_dispatch:

jobs:
fossa:
uses: Updater/.github-private/.github/workflows/fossa.yaml@main
secrets:
fossa-api-key: ${{ secrets.FOSSA_API_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
with:
repository: ${{ github.repository }}
ref: ${{ github.ref }}
49 changes: 49 additions & 0 deletions .github/workflows/gitstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Code generated by gitStream GitHub app - DO NOT EDIT

name: gitStream workflow automation
run-name: |
/:\ gitStream: PR #${{ fromJSON(fromJSON(github.event.inputs.client_payload)).pullRequestNumber }} from ${{ github.event.inputs.full_repository }}

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: 15
runs-on: ubuntu-latest
name: gitStream workflow automation
steps:
- name: Evaluate Rules
uses: linear-b/gitstream-github-action@v2-lite
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 }}
54 changes: 50 additions & 4 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ jobs:

name: Install chart-testing and test presence in path
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install chart-testing
uses: ./
- name: Check install!
run: |
ct version
CT_VERSION_OUTPUT=$(ct version 2>&1 /dev/null)
ACTUAL_VERSION=$(echo "$CT_VERSION_OUTPUT" | grep Version | rev | cut -d ' ' -f1 | rev)
if [[ $ACTUAL_VERSION != 'v3.10.1' ]]; then
echo 'should be v3.10.1'
if [[ $ACTUAL_VERSION != 'v3.14.0' ]]; then
echo 'should be v3.14.0'
exit 1
else
exit 0
Expand All @@ -38,7 +38,7 @@ jobs:

name: Install Custom chart-testing and test presence in path
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install chart-testing
uses: ./
with:
Expand All @@ -65,3 +65,49 @@ jobs:
else
exit 0
fi

test_ct_action_with_helm:
runs-on: ubuntu-latest

name: run action to test a helm chart
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
with:
version: v3.17.0

- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.x'
check-latest: true

- name: Install chart-testing
uses: ./

- run: |
sed -i "s/version: .*/version: 2.0.0/" testdata/simple-deployment/Chart.yaml
cat testdata/simple-deployment/Chart.yaml

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --chart-dirs=testdata --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --chart-dirs=testdata --target-branch ${{ github.event.repository.default_branch }}

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.13.0

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --chart-dirs=testdata --target-branch ${{ github.event.repository.default_branch }}
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ A GitHub Action for installing the [helm/chart-testing](https://github.com/helm/
1. A GitHub repo containing a directory with your Helm charts (e.g: `charts`)
1. A workflow YAML file in your `.github/workflows` directory.
An [example workflow](#example-workflow) is available below.
For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)
For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://docs.github.com/en/actions/writing-workflows/quickstart#creating-your-first-workflow)

### Inputs

For more information on inputs, see the [API Documentation](https://developer.github.com/v3/repos/releases/#input)

- `version`: The chart-testing version to install (default: `3.9.0`)
- `yamllint_version`: The chart-testing version to install (default: `1.27.1`)
- `yamale_version`: The chart-testing version to install (default: `3.0.4`)
- `version`: The chart-testing version to install (default: `3.14.0`)
- `yamllint_version`: The `yamllint` version to install (default: `1.33.0`)
- `yamale_version`: The `yamale` version to install (default: `6.0.0`)

### Example Workflow

Expand All @@ -32,27 +32,29 @@ name: Lint and Test Charts

on: pull_request

permissions: {}

jobs:
lint-test:
runs-on: ubuntu-latest
permisions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5.0.0
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1
uses: azure/setup-helm@v4.3.1

- uses: actions/setup-python@v4
- uses: actions/setup-python@v6.0.0
with:
python-version: '3.10'
python-version: '3.x'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.0
uses: helm/chart-testing-action@v2.8.0

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -68,7 +70,7 @@ jobs:

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1.12.0

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
Expand Down
Loading