Skip to content

Commit 1d3de14

Browse files
authored
Merge pull request #2 from CodeAnt-AI/sha-fix
sha fixes
2 parents 3faa12f + 870206c commit 1d3de14

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ubuntu-latest
4040
steps:
4141
- name: Run CodeAnt Scan
42-
uses: CodeAnt-AI/[email protected].2
42+
uses: CodeAnt-AI/[email protected].5
4343
with:
4444
access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
4545
```
@@ -48,7 +48,7 @@ jobs:
4848
4949
```yaml
5050
- name: Run CodeAnt Quality Gate Scan
51-
uses: CodeAnt-AI/[email protected].2
51+
uses: CodeAnt-AI/[email protected].5
5252
with:
5353
access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
5454
api_base: https://api.codeant.ai
@@ -73,7 +73,7 @@ jobs:
7373
runs-on: ubuntu-latest
7474
steps:
7575
- name: Run CodeAnt Quality Gate Scan
76-
uses: CodeAnt-AI/[email protected].2
76+
uses: CodeAnt-AI/[email protected].5
7777
with:
7878
access_token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
7979
api_base: https://api.codeant.ai

README_LOCAL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ Users should know how to test before publishing
184184
185185
### ✅ Context Variables
186186
```yaml
187-
${{ github.repository }} # Current repository
188-
${{ github.sha }} # Commit SHA
189-
${{ github.ref_name }} # Branch/tag name
190-
${{ secrets.GITHUB_TOKEN }} # Auto-generated token
187+
${{ github.repository }} # Current repository
188+
${{ github.event.pull_request.head.sha }} # Pull request head commit SHA
189+
${{ github.ref_name }} # Branch/tag name
190+
${{ secrets.GITHUB_TOKEN }} # Auto-generated token
191191
```
192192

193193
### ✅ Environment Variables

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ runs:
7070
env:
7171
ACCESS_TOKEN: ${{ inputs.access_token }}
7272
REPO_NAME: ${{ github.repository }}
73-
COMMIT_ID: ${{ github.sha }}
73+
COMMIT_ID: ${{ github.event.pull_request.head.sha || github.sha }}
7474
run: |
7575
set -e
7676
echo "Starting quality gate scan..."
@@ -87,7 +87,7 @@ runs:
8787
env:
8888
ACCESS_TOKEN: ${{ inputs.access_token }}
8989
REPO_NAME: ${{ github.repository }}
90-
COMMIT_ID: ${{ github.sha }}
90+
COMMIT_ID: ${{ github.event.pull_request.head.sha || github.sha }}
9191
TIMEOUT: ${{ inputs.timeout }}
9292
POLL_INTERVAL: ${{ inputs.poll_interval }}
9393
run: |

0 commit comments

Comments
 (0)