-
Notifications
You must be signed in to change notification settings - Fork 539
Issue-Bot: Emit GitHub Action annotation when issues are affected #4326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8059775
Issue-Bot: Emit GitHub Action annotation when issues are affected
staabm feb5c69
Update EvaluateCommand.php
staabm 4288b61
Update issue-bot.yml
staabm 46dda40
Update issue-bot.yml
staabm a52a7ee
Update issue-bot.yml
staabm c330e59
Update issue-bot.yml
staabm 64f306b
try without path
staabm 1bce8e7
Update issue-bot.yml
staabm 714c461
remove debug code
staabm 3d1e787
Update issue-bot.yml
staabm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
|
||
name: "Issue bot" | ||
Check notice on line 3 in .github/workflows/issue-bot.yml
|
||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -160,7 +160,17 @@ | |
if: github.event_name == 'pull_request' | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
run: ./console.php evaluate >> $GITHUB_STEP_SUMMARY | ||
run: | | ||
set +e | ||
./console.php evaluate >> $GITHUB_STEP_SUMMARY | ||
exit_code="$?" | ||
|
||
if [[ "$exit_code" == "2" ]]; then | ||
echo "::notice file=.github/workflows/issue-bot.yml,line=3 ::Issue bot detected open issues which are affected by this pull request - see https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" | ||
exit 0 | ||
fi | ||
|
||
exit $exit_code | ||
|
||
- name: "Evaluate results - push" | ||
working-directory: "issue-bot" | ||
|
@@ -169,4 +179,13 @@ | |
GITHUB_PAT: ${{ secrets.PHPSTAN_BOT_TOKEN }} | ||
PHPSTAN_SRC_COMMIT_BEFORE: ${{ github.event.before }} | ||
PHPSTAN_SRC_COMMIT_AFTER: ${{ github.event.after }} | ||
run: ./console.php evaluate --post-comments >> $GITHUB_STEP_SUMMARY | ||
run: | | ||
set +e | ||
./console.php evaluate --post-comments >> $GITHUB_STEP_SUMMARY | ||
|
||
# its fine when issue-bot found affected issues | ||
if [[ "$exit_code" == "2" ]]; then | ||
exit 0 | ||
fi | ||
|
||
exit $exit_code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: remove this debug line, which atm enforce rendering of the github action annotation message