mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-05-14 08:58:25 +00:00
Update ci.yml
This commit is contained in:
@@ -27,21 +27,15 @@ jobs:
|
||||
|
||||
- run: npm install
|
||||
|
||||
- name: Get PR author
|
||||
if: github.event_name == 'pull_request'
|
||||
run: echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Get PR labels
|
||||
- name: Fetch PR information
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV
|
||||
echo "PR_AUTHOR_ID=${{ github.event.pull_request.user.id }}" >> $GITHUB_ENV
|
||||
|
||||
LABELS=$(gh api --jq '[.labels[].name]' /repos/{owner}/{repo}/pulls/${{ github.event.number }})
|
||||
echo "PR_LABELS=$LABELS" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
- name: Get changed files
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
FILES=$(gh api --jq '[.[] | select(.status != "removed") | .filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files)
|
||||
echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user