Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurZucker committed Aug 28, 2024
1 parent 1191d63 commit 214af5a
Showing 1 changed file with 4 additions and 51 deletions.
55 changes: 4 additions & 51 deletions .github/workflows/self-comment-slow-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,29 +63,6 @@ jobs:
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
-f "target_url=$GITHUB_RUN_URL" -f "state=pending" -f "description=Custom CI job" -f "context=pytest/custom-tests"
- name: Create Check Run
if: always()
id: create_check_run
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_RUN_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/check-runs \
-f "name=Custom slow tests" \
-f "head_sha=${{ github.event.pull_request.head.sha }}" \
-f "details_url=$GITHUB_RUN_URL" \
-f "status=in_progress" \
-f "external_id=42" \
-f "started_at=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
-f "output[title]=Mighty Readme report" \
-f "output[summary]=The current GitHub Actions run can be viewed here: $GITHUB_RUN_URL" \
-f "output[text]=Detailed output goes here." \
- name: Trigger specific job
run: |
echo "Running the specific job because /pytest was found"
Expand All @@ -97,35 +74,11 @@ jobs:
CHECK_RUN_ID: ${{ env.CHECK_RUN_ID }}
run: |
gh api \
--method PATCH \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/check-runs/${{ env.CHECK_RUN_ID }} \
-f "name=mighty_readme" \
-f "started_at=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
-f "status=completed" \
-f "conclusion=success" \
-f "completed_at=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
-f "output[title]=Mighty Readme report" \
-f "output[summary]=There are 0 failures, 2 warnings, and 1 notices." \
-f "output[text]=You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app." \
-f "output[annotations[][path]]=README.md" \
-f "output[annotations[][annotation_level]]=warning" \
-f "output[annotations[][title]]=Spell Checker" \
-f "output[annotations[][message]]=Check your spelling for 'banaas'." \
-f "output[annotations[][raw_details]]=Do you mean 'bananas' or 'banana'?" \
-f "output[annotations[][start_line]]=2" \
-f "output[annotations[][end_line]]=2" \
-f "output[annotations[][path]]=README.md" \
-f "output[annotations[][annotation_level]]=warning" \
-f "output[annotations[][title]]=Spell Checker" \
-f "output[annotations[][message]]=Check your spelling for 'aples'" \
-f "output[annotations[][raw_details]]=Do you mean 'apples' or 'Naples'" \
-f "output[annotations[][start_line]]=4" \
-f "output[annotations[][end_line]]=4" \
-f "output[images[][alt]]=Super bananas" \
-f "output[images[][image_url]]=http://example.com/images/42"
/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
-f "target_url=$GITHUB_RUN_URL" -f "state=success" -f "description=Custom CI job" -f "context=pytest/custom-tests"

run_if_label_matches:
Expand All @@ -146,7 +99,7 @@ jobs:
NUMBER: ${{ github.event.issue.number }}

testing-stuff-around:
if: contains(github.event.comment.html_url, '/pull/') # check if the comments come from pull request, exclude those from issue.
if: contains() # check if the comments come from pull request, exclude those from issue.
runs-on: ubuntu-22.04
steps:
- name: say hello
Expand Down

0 comments on commit 214af5a

Please sign in to comment.