Skip to content

Commit 676d228

Browse files
authored
Merge pull request #2 from CodeAnt-AI/access-token-namechange
timeout flag
2 parents 07505c4 + d4274f4 commit 676d228

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ Customize the scan with additional options:
5454
api_base: 'https://api.codeant.ai'
5555
include_paths: 'src/,lib/'
5656
exclude_paths: 'test/,docs/'
57+
scan_timeout: '600'
5758
```
5859
5960
## Inputs
@@ -64,6 +65,7 @@ Customize the scan with additional options:
6465
| `api_base` | CodeAnt API base URL | No | `https://api.codeant.ai` |
6566
| `include_paths` | Comma-separated paths to include in scan | No | `''` (all files) |
6667
| `exclude_paths` | Comma-separated paths to exclude from scan | No | `''` (none) |
68+
| `scan_timeout` | Scan timeout in seconds | No | `300` |
6769

6870
## Setup
6971

@@ -148,6 +150,17 @@ jobs:
148150
exclude_paths: 'src/tests/,backend/vendor/'
149151
```
150152

153+
### Custom Timeout Configuration
154+
155+
Configure a longer timeout for large repositories:
156+
157+
```yaml
158+
- uses: CodeAnt-AI/codeant-ci-scan-action@v0.0.1
159+
with:
160+
access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
161+
scan_timeout: '900' # 15 minutes (default: 300 seconds / 5 minutes)
162+
```
163+
151164
## Troubleshooting
152165

153166
### Authentication Errors
@@ -162,6 +175,12 @@ jobs:
162175
- Check that the API base URL is correct
163176
- Review the action logs for specific error messages
164177

178+
### Timeout Issues
179+
180+
- If scans are timing out, increase the `scan_timeout` value (default: 300 seconds)
181+
- For large repositories, consider setting `scan_timeout: '900'` or higher
182+
- Check network connectivity if timeouts persist
183+
165184
## Support
166185
167186
- 📧 Email: chinmay@codeant.ai

action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ inputs:
2121
description: 'Comma-separated paths to exclude from scan'
2222
required: false
2323
default: ''
24+
scan_timeout:
25+
description: 'Scan timeout in seconds'
26+
required: false
27+
default: '300'
2428

2529
runs:
2630
using: 'composite'
@@ -54,6 +58,7 @@ runs:
5458
BRANCH: ${{ github.ref_name }}
5559
INCLUDE_PATHS: ${{ inputs.include_paths }}
5660
EXCLUDE_PATHS: ${{ inputs.exclude_paths }}
61+
SCAN_TIMEOUT: ${{ inputs.scan_timeout }}
5762
run: |
5863
bash start_scan.sh \
5964
-a "$ACCESS_TOKEN" \
@@ -62,4 +67,5 @@ runs:
6267
-b "$BRANCH" \
6368
-s github \
6469
-i "$INCLUDE_PATHS" \
65-
-e "$EXCLUDE_PATHS"
70+
-e "$EXCLUDE_PATHS" \
71+
-t "$SCAN_TIMEOUT"

0 commit comments

Comments
 (0)