Skip to content

Commit 7825b62

Browse files
committed
Update readme
1 parent ec62a96 commit 7825b62

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
11
# GPT Debugger
22

3+
Debug flaky CI/CD pipelines with GPT-4.
4+
5+
## Inputs
6+
7+
- `OPENAI_API_KEY` - OpenAI API key. You can get it from [OpenAI](https://platform.openai.com/account/api-keys).
8+
9+
## How to
10+
11+
1. Redirect `stderr` of one of your steps to `gpt_error.log` file:
12+
2. Add new step to your workflow and mark it with either `always()` or `failure()` expression:
13+
14+
```yaml
15+
jobs:
16+
tests:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Run e2e
20+
id: e2e
21+
run: npm run e2e 2> gpt_error.log
22+
23+
- uses: przeprogramowani/gpt-debugger@main
24+
if: ${{ failure() }}
25+
with:
26+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
27+
```
28+
29+
## Output
30+
31+
Example output from the action:
32+
33+
```txt
34+
🧑‍⚕️ Presenting GPT-4 issue analysis:
35+
36+
The error indicates that an "e2e" script is expected but not defined in the package.json file. To fix this issue, ensure you have an "e2e" script specified in your package.json file under the "scripts" section. If your intention was to run end-to-end tests, you might need something like:
37+
38+
"scripts": {
39+
"e2e": "your-e2e-test-command here"
40+
}
41+
42+
Replace "your-e2e-test-command here" with the actual command you use to run your end-to-end tests.
43+
44+
Relevant file:
45+
- package.json
46+
```
47+
48+
## Authors
49+
350
- [Przeprogramowani](https://przeprogramowani.pl)
451
- [Opanuj Frontend](https://opanujfrontend.pl)

0 commit comments

Comments
 (0)