mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-12 22:14:49 +00:00
Merge branch 'main' into main
This commit is contained in:
2 files changed
+17
-18
No files matched your search
@@ -29,20 +29,15 @@ jobs:
|
||||
|
||||
- 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
|
||||
|
||||
FILES=$(gh api --jq '[.[] | select(.status != "removed") | .filename]' /repos/{owner}/{repo}/pulls/${{ github.event.number }}/files)
|
||||
echo "CHANGED_FILES=$FILES" >> $GITHUB_ENV
|
||||
|
||||
REMOVED_FILE_DATA=$(gh api --jq '[.[] | select(.status == "removed") | {name: .filename, data: .patch}]' /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files)
|
||||
echo "DELETED_FILES=$REMOVED_FILE_DATA" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
PR: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
echo "PR_AUTHOR=${{ github.event.pull_request.user.login }}" >> "$GITHUB_ENV"
|
||||
echo "PR_AUTHOR_ID=${{ github.event.pull_request.user.id }}" >> "$GITHUB_ENV"
|
||||
echo "PR_LABELS=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '[.labels[].name]')" >> "$GITHUB_ENV"
|
||||
echo "CHANGED_FILES=$(gh api --jq '[.[] | select(.status != "removed") | .filename]' "repos/${{ github.repository }}/pulls/$PR/files")" >> "$GITHUB_ENV"
|
||||
echo "DELETED_FILES=$(gh api --jq '[.[] | select(.status == "removed") | {name: .filename, data: .patch}]' "repos/${{ github.repository }}/pulls/$PR/files")" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: gacts/install-dnscontrol@890ba3249712c51203ccb7aba63307c0091e921b # v1.3.4
|
||||
if: github.event_name == 'pull_request' && contains(fromJson(env.CHANGED_FILES), 'dnsconfig.js')
|
||||
@@ -50,8 +45,8 @@ jobs:
|
||||
version: 4.14.0
|
||||
|
||||
- name: Run DNSControl checks
|
||||
run: dnscontrol check
|
||||
if: github.event_name == 'pull_request' && contains(fromJson(env.CHANGED_FILES), 'dnsconfig.js')
|
||||
run: dnscontrol check
|
||||
|
||||
- name: Run tests
|
||||
run: npx ava tests/*.test.js --timeout=1m
|
||||
@@ -103,11 +103,15 @@ jobs:
|
||||
"",
|
||||
"Please make sure that:",
|
||||
"",
|
||||
"- The PR template has not been modified. *(modifying the PR template will make this check fail)*",
|
||||
"- All requirement checkboxes are checked. *(they must be changed exactly to `[x]`, NOT something like `[ x ]`)*",
|
||||
"- **Website Preview** is filled out. *(make sure it is filled between the start/end comment markers)*",
|
||||
"- **Website Purpose** is filled out. *(make sure it is filled between the start/end comment markers)*",
|
||||
"",
|
||||
"- The PR template has not been modified.",
|
||||
" - *Modifying the PR template will make this check fail.*",
|
||||
"- All requirement checkboxes are checked.",
|
||||
" - *All checkboxes must be changed exactly to `[x]`, NOT something like `[ x ]`.*",
|
||||
"- **Website Preview** is filled out.",
|
||||
" - *Make sure it is filled between the start/end comment markers.*",
|
||||
"- **Website Purpose** is filled out.",
|
||||
" - *Make sure it is filled between the start/end comment markers.*",
|
||||
"---",
|
||||
"Once the template has been properly completed, this check will run again automatically."
|
||||
].join("\n");
|
||||
|
||||
|
||||
Reference in new issue
Block a user