Skip to content

Commit

Permalink
fix: run: sanitize branch name when generating volume name (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop authored Sep 9, 2024
1 parent 056c313 commit 3c56010
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/gen_ai_review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "gen: AI review"
on:
pull_request:
types: [opened, reopened, ready_for_review]
issue_comment:
jobs:
pr_agent_job:
if: ${{ github.event.sender.type != 'Bot' }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
issues: write
pull-requests: write
contents: write
name: Run pr agent on every pull request, respond to user comments
steps:
- name: PR Agent action step
id: pragent
uses: Codium-ai/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
config.max_model_tokens: 100000
config.model: "anthropic/claude-3-5-sonnet-20240620"
config.model_turbo: "anthropic/claude-3-5-sonnet-20240620"
config.ignore.glob: "['vendor/**','**/client_gen.go','**/models_gen.go','**/generated.go','**/*.gen.go']"
2 changes: 1 addition & 1 deletion dockercompose/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func runVolumeName(
volumeName string,
branchName string,
) string {
return fmt.Sprintf("%s-run-%s-%s", branchName, runName, volumeName)
return fmt.Sprintf("%s-run-%s-%s", sanitizeBranch(branchName), runName, volumeName)
}

func run(
Expand Down

0 comments on commit 3c56010

Please sign in to comment.