Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
10 changes: 10 additions & 0 deletions examples/workflows/gemini-assistant/gemini-invoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@
issues: 'write'
pull-requests: 'write'
steps:
- name: 'Sanitize workflow name'
id: 'sanitize_workflow_name'
env:
RAW_WORKFLOW_NAME: ${{ github.workflow }}

Check failure on line 31 in examples/workflows/gemini-assistant/gemini-invoke.yml

View workflow job for this annotation

GitHub Actions / Lint (yaml)

31:30 [quoted-strings] string value is not quoted with single quotes
run: |
# Remove emojis and special chars, convert spaces to underscores, lowercase
SANITIZED=$(echo "$RAW_WORKFLOW_NAME" | sed 's/[^ a-zA-Z0-9]//g' | xargs | tr ' ' '_' | tr '[:upper:]' '[:lower:]')
echo "gh_workflow_name=$SANITIZED" >> $GITHUB_OUTPUT

- name: 'Mint identity token'
id: 'mint_identity_token'
if: |-
Expand All @@ -49,6 +58,7 @@
ISSUE_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
REPOSITORY: '${{ github.repository }}'
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'
GH_WORKFLOW_NAME: '${{ steps.sanitize_workflow_name.outputs.gh_workflow_name }}'
with:
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
Expand Down
10 changes: 10 additions & 0 deletions examples/workflows/issue-triage/gemini-scheduled-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@
ISSUE_COUNT="$(echo "${ISSUES}" | jq 'length')"
echo "✅ Found ${ISSUE_COUNT} issue(s) to triage! 🎯"
- name: 'Sanitize workflow name'
id: 'sanitize_workflow_name'
env:
RAW_WORKFLOW_NAME: ${{ github.workflow }}
run: |
# Remove emojis and special chars, convert spaces to underscores, lowercase
SANITIZED=$(echo "$RAW_WORKFLOW_NAME" | sed 's/[^ a-zA-Z0-9]//g' | xargs | tr ' ' '_' | tr '[:upper:]' '[:lower:]')
echo "gh_workflow_name=$SANITIZED" >> $GITHUB_OUTPUT

Check failure on line 91 in examples/workflows/issue-triage/gemini-scheduled-triage.yml

View workflow job for this annotation

GitHub Actions / Lint (yaml)

91:30 [quoted-strings] string value is not quoted with single quotes
- name: 'Run Gemini Issue Analysis'
id: 'gemini_issue_analysis'
if: |-
Expand All @@ -91,6 +100,7 @@
ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}'
REPOSITORY: '${{ github.repository }}'
AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}'
GH_WORKFLOW_NAME: '${{ steps.sanitize_workflow_name.outputs.gh_workflow_name }}'
with:
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
Expand Down
10 changes: 10 additions & 0 deletions examples/workflows/issue-triage/gemini-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
core.info(`Found ${labelNames.length} labels: ${labelNames.join(', ')}`);
return labelNames;

- name: 'Sanitize workflow name'
id: 'sanitize_workflow_name'
env:
RAW_WORKFLOW_NAME: ${{ github.workflow }}
run: |
# Remove emojis and special chars, convert spaces to underscores, lowercase
SANITIZED=$(echo "$RAW_WORKFLOW_NAME" | sed 's/[^ a-zA-Z0-9]//g' | xargs | tr ' ' '_' | tr '[:upper:]' '[:lower:]')
echo "gh_workflow_name=$SANITIZED" >> $GITHUB_OUTPUT

Check failure on line 61 in examples/workflows/issue-triage/gemini-triage.yml

View workflow job for this annotation

GitHub Actions / Lint (yaml)

61:30 [quoted-strings] string value is not quoted with single quotes

- name: 'Run Gemini issue analysis'
id: 'gemini_analysis'
if: |-
Expand All @@ -61,6 +70,7 @@
ISSUE_TITLE: '${{ github.event.issue.title }}'
ISSUE_BODY: '${{ github.event.issue.body }}'
AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}'
GH_WORKFLOW_NAME: '${{ steps.sanitize_workflow_name.outputs.gh_workflow_name }}'
with:
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
Expand Down
10 changes: 10 additions & 0 deletions examples/workflows/pr-review/gemini-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
permission-issues: 'write'
permission-pull-requests: 'write'

- name: 'Sanitize workflow name'
id: 'sanitize_workflow_name'
env:
RAW_WORKFLOW_NAME: ${{ github.workflow }}

Check failure on line 44 in examples/workflows/pr-review/gemini-review.yml

View workflow job for this annotation

GitHub Actions / Lint (yaml)

44:30 [quoted-strings] string value is not quoted with single quotes
run: |
# Remove emojis and special chars, convert spaces to underscores, lowercase
SANITIZED=$(echo "$RAW_WORKFLOW_NAME" | sed 's/[^ a-zA-Z0-9]//g' | xargs | tr ' ' '_' | tr '[:upper:]' '[:lower:]')
echo "gh_workflow_name=$SANITIZED" >> $GITHUB_OUTPUT

- name: 'Checkout repository'
uses: 'actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8' # ratchet:actions/checkout@v5

Expand All @@ -51,6 +60,7 @@
PULL_REQUEST_NUMBER: '${{ github.event.pull_request.number || github.event.issue.number }}'
REPOSITORY: '${{ github.repository }}'
ADDITIONAL_CONTEXT: '${{ inputs.additional_context }}'
GH_WORKFLOW_NAME: '${{ steps.sanitize_workflow_name.outputs.gh_workflow_name }}'
with:
gcp_location: '${{ vars.GOOGLE_CLOUD_LOCATION }}'
gcp_project_id: '${{ vars.GOOGLE_CLOUD_PROJECT }}'
Expand Down
Loading