File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ Before contributing, ensure you have:
6565 ` ` ` sh
6666 npm run docs
6767 ` ` `
68+ - If you update workflow files in ` /.gemini/workflows/` , run ` ./scripts/generate-examples.sh` to auto-generate the examples.
6869
69703. ** Commit Your Changes**
7071 - Commit with a descriptive message following [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
6+ REPO_ROOT=" $( cd " ${SCRIPT_DIR} /.." && pwd) "
7+
8+ WORKFLOWS_DIR=" ${REPO_ROOT} /.github/workflows"
9+ EXAMPLES_DIR=" ${REPO_ROOT} /examples/workflows"
10+
11+ for workflow_file in " ${WORKFLOWS_DIR} " /* .yml; do
12+ workflow_name=" $( basename " ${workflow_file} " ) "
13+ example_dir=" "
14+ example_filename=" "
15+
16+ # Add case for each file that should exist in /examples/
17+ case " ${workflow_name} " in
18+ " gemini-invoke.yml" )
19+ example_dir=" ${EXAMPLES_DIR} /gemini-assistant"
20+ example_filename=" gemini-invoke.yml"
21+ ;;
22+ " gemini-triage.yml" )
23+ example_dir=" ${EXAMPLES_DIR} /issue-triage"
24+ example_filename=" gemini-triage.yml"
25+ ;;
26+ " gemini-scheduled-triage.yml" )
27+ example_dir=" ${EXAMPLES_DIR} /issue-triage"
28+ example_filename=" gemini-scheduled-triage.yml"
29+ ;;
30+ " gemini-review.yml" )
31+ example_dir=" ${EXAMPLES_DIR} /pr-review"
32+ example_filename=" gemini-review.yml"
33+ ;;
34+ * )
35+ echo " Skipping ${workflow_name} "
36+ continue
37+ ;;
38+ esac
39+
40+ example_file=" ${example_dir} /${example_filename} "
41+ echo " Generating ${example_file} "
42+
43+ # Update lines that are different in the /examples/, such as the version of the action
44+ sed \
45+ -e " s|uses: 'google-github-actions/run-gemini-cli@main'|uses: 'google-github-actions/run-gemini-cli@v0'|g" \
46+ " ${workflow_file} " > " ${example_file} "
47+ done
You can’t perform that action at this time.
0 commit comments