-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (47 loc) · 1.57 KB
/
Copy pathbugster-pr-create.yml
File metadata and controls
51 lines (47 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Bugster PR Create
on:
issues:
types: [labeled]
issue_comment:
types: [created]
permissions:
contents: write
issues: write
pull-requests: write
jobs:
bugster:
if: ${{ (github.event_name == 'issues' &&
contains( github.event.label.name, 'bugster')) ||
(github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains( github.event.comment.body, 'Hey bugster')) }}
runs-on: ubuntu-latest
steps:
- name: Install jq
run: sudo apt-get install jq
# - name: Check if label was added by a collaborator
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# is_collaborator=$(curl -s -H "Authorization: token $GITHUB_TOKEN " -H "Accept: application/vnd.github+json" \
# "https://api.github.com/repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}" | jq -r '.message')
# if [ "$is_collaborator" == "Not Found" ]; then
# echo "Label not added by a collaborator. Skipping action."
# exit 78
# fi
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Bugster
uses: docker://ghcr.io/bugster-ai/bugster-pr-workflow:latest
env:
BUGSTER_API_KEY: ${{ secrets.BUGSTER_API_KEY }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
base_branch: ${{ github.event.repository.default_branch }}
model: gpt-4
context_limit: 8192
min_tokens: 1000
max_tokens: 2000
num_reasks: 2