chore: steps to reduce contributor friction (#185)

* chore: steps to reduce contributor friction

* Update CLAUDE.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Justin Poehnelt
2026-03-05 10:08:50 -07:00
committed by GitHub
parent 473dd30500
commit 62d6ddbfa9
5 changed files with 63 additions and 23 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"attribution": {
"commit": ""
}
}
-23
View File
@@ -93,29 +93,6 @@ jobs:
- name: Clippy
run: cargo clippy -- -D warnings
policy-check:
name: Policy Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enforce AGENTS.md rules
run: |
if grep -qE "^google-[a-zA-Z0-9_-]+[[:space:]]*=" Cargo.toml; then
echo "::error file=Cargo.toml::Violates AGENTS.md: Adding generated google-* crates is prohibited. The CLI uses dynamic schema discovery at runtime."
exit 1
fi
echo "Policy check passed."
- name: Enforce Changeset File
if: github.event_name == 'pull_request'
run: |
git fetch origin ${{ github.base_ref }}
if ! git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^.changeset/.*\.md$"; then
echo "::error::A Changeset file is required! Please run 'npx changeset' or manually create a markdown file in the .changeset directory describing your changes to automatically version and release this PR."
exit 1
fi
echo "Changeset file found!"
skills:
name: Verify Skills
+2
View File
@@ -17,8 +17,10 @@ name: Coverage
on:
push:
branches: [main]
paths: ['**/*.rs', 'Cargo.toml', 'Cargo.lock']
pull_request:
branches: [main]
paths: ['**/*.rs', 'Cargo.toml', 'Cargo.lock']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
+55
View File
@@ -0,0 +1,55 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Policy
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
policy-check:
name: Policy Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enforce AGENTS.md rules
run: |
if grep -qE "^google-[a-zA-Z0-9_-]+[[:space:]]*=" Cargo.toml; then
echo "::error file=Cargo.toml::Violates AGENTS.md: Adding generated google-* crates is prohibited. The CLI uses dynamic schema discovery at runtime."
exit 1
fi
echo "Policy check passed."
- name: Enforce Changeset File
if: github.event_name == 'pull_request'
run: |
git fetch origin ${{ github.base_ref }}
# Skip changeset requirement if no Rust/Cargo files changed
if ! git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -qE '\.(rs)$|^Cargo\.(toml|lock)$'; then
echo "No Rust/Cargo files changed; skipping changeset requirement."
exit 0
fi
if ! git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -q "^.changeset/.*\.md$"; then
echo "::error::A Changeset file is required! Please run 'npx changeset' or manually create a markdown file in the .changeset directory describing your changes to automatically version and release this PR."
exit 1
fi
echo "Changeset file found!"
+1
View File
@@ -0,0 +1 @@
When contributing to this repository, you must strictly follow all guidelines outlined in the AGENTS.md file.