Created
July 7, 2022 15:20
-
-
Save parth-gr/61baa7c7cd27c5bbf1a351b1225db308 to your computer and use it in GitHub Desktop.
Logs for auto-assign
This file contains 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
2022-07-07T12:35:49.1963633Z Requested labels: ubuntu-latest | |
2022-07-07T12:35:49.1963682Z Job defined at: parth-gr/auto-assign-issue/.github/workflows/assign1.yaml@refs/heads/main | |
2022-07-07T12:35:49.1963704Z Waiting for a runner to pick up this job... | |
2022-07-07T12:35:50.0836720Z Job is waiting for a hosted runner to come online. | |
2022-07-07T12:35:54.3890312Z Job is about to start running on the hosted runner: Hosted Agent (hosted) | |
2022-07-07T12:35:57.8081397Z Current runner version: '2.294.0' | |
2022-07-07T12:35:57.8109448Z ##[group]Operating System | |
2022-07-07T12:35:57.8109974Z Ubuntu | |
2022-07-07T12:35:57.8110385Z 20.04.4 | |
2022-07-07T12:35:57.8110712Z LTS | |
2022-07-07T12:35:57.8110980Z ##[endgroup] | |
2022-07-07T12:35:57.8111351Z ##[group]Virtual Environment | |
2022-07-07T12:35:57.8111756Z Environment: ubuntu-20.04 | |
2022-07-07T12:35:57.8112443Z Version: 20220626.1 | |
2022-07-07T12:35:57.8113036Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20220626.1/images/linux/Ubuntu2004-Readme.md | |
2022-07-07T12:35:57.8113771Z Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20220626.1 | |
2022-07-07T12:35:57.8114227Z ##[endgroup] | |
2022-07-07T12:35:57.8114611Z ##[group]Virtual Environment Provisioner | |
2022-07-07T12:35:57.8115064Z 1.0.0.0-main-20220616-1 | |
2022-07-07T12:35:57.8115367Z ##[endgroup] | |
2022-07-07T12:35:57.8116433Z ##[group]GITHUB_TOKEN Permissions | |
2022-07-07T12:35:57.8117110Z Actions: write | |
2022-07-07T12:35:57.8117656Z Checks: write | |
2022-07-07T12:35:57.8118011Z Contents: write | |
2022-07-07T12:35:57.8118364Z Deployments: write | |
2022-07-07T12:35:57.8118781Z Discussions: write | |
2022-07-07T12:35:57.8119081Z Issues: write | |
2022-07-07T12:35:57.8119415Z Metadata: read | |
2022-07-07T12:35:57.8119769Z Packages: write | |
2022-07-07T12:35:57.8120058Z Pages: write | |
2022-07-07T12:35:57.8120444Z PullRequests: write | |
2022-07-07T12:35:57.8120828Z RepositoryProjects: write | |
2022-07-07T12:35:57.8121174Z SecurityEvents: write | |
2022-07-07T12:35:57.8121528Z Statuses: write | |
2022-07-07T12:35:57.8121876Z ##[endgroup] | |
2022-07-07T12:35:57.8125767Z Secret source: Actions | |
2022-07-07T12:35:57.8126354Z Prepare workflow directory | |
2022-07-07T12:35:57.8962569Z Prepare all required actions | |
2022-07-07T12:35:58.0395847Z ##[group]Run BODY="$(jq '.comment.body' $GITHUB_EVENT_PATH)" | |
2022-07-07T12:35:58.0396579Z [36;1mBODY="$(jq '.comment.body' $GITHUB_EVENT_PATH)"[0m | |
2022-07-07T12:35:58.0397026Z [36;1mISSUE_NUMBER="$(jq '.issue.number' $GITHUB_EVENT_PATH)"[0m | |
2022-07-07T12:35:58.0397670Z [36;1mLOGIN="$(jq '.comment.user.login' $GITHUB_EVENT_PATH | tr -d \")"[0m | |
2022-07-07T12:35:58.0398220Z [36;1mREPO="$(jq '.repository.full_name' $GITHUB_EVENT_PATH | tr -d \")"[0m | |
2022-07-07T12:35:58.0398732Z [36;1mISSUE_JSON="$(jq '.issue' $GITHUB_EVENT_PATH)"[0m | |
2022-07-07T12:35:58.0399200Z [36;1mISSUE_CURRENTLY_ASSIGNED=`echo $ISSUE_JSON | jq '.assignees | length == 0'`[0m | |
2022-07-07T12:35:58.0399652Z [36;1m[0m | |
2022-07-07T12:35:58.0400060Z [36;1mif [[ $BODY == *"$INPUT_TRIGGER"* ]]; then[0m | |
2022-07-07T12:35:58.0400462Z [36;1m if [[ "$ISSUE_CURRENTLY_ASSIGNED" == true ]]; then[0m | |
2022-07-07T12:35:58.0401004Z [36;1m echo "Assigning issue $ISSUE_NUMBER to $LOGIN"[0m | |
2022-07-07T12:35:58.0401735Z [36;1m curl -H "Authorization: token $GITHUB_TOKEN" -d '{"assignees":["'"$LOGIN"'"]}' https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/assignees[0m | |
2022-07-07T12:35:58.0402337Z [36;1m if [[ ! -z $INPUT_MESSAGE ]]; then[0m | |
2022-07-07T12:35:58.0402827Z [36;1m jq -n -r --arg body "$INPUT_MESSAGE" '{body: $body}' > payload.json[0m | |
2022-07-07T12:35:58.0403557Z [36;1m curl -X POST -H "Authorization: token $GITHUB_TOKEN" --data @payload.json https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/comments[0m | |
2022-07-07T12:35:58.0404138Z [36;1m fi[0m | |
2022-07-07T12:35:58.0404412Z [36;1m else[0m | |
2022-07-07T12:35:58.0404890Z [36;1m echo "This issue is currently assigned to a different user"[0m | |
2022-07-07T12:35:58.0405415Z [36;1m if [[ ! -z $ISSUE_CURRENTLY_ASSIGNED_MESSAGE ]]; then[0m | |
2022-07-07T12:35:58.0405972Z [36;1m jq -n -r --arg body "$ISSUE_CURRENTLY_ASSIGNED_MESSAGE" '{body: $body}' > payload.json[0m | |
2022-07-07T12:35:58.0406662Z [36;1m curl -X POST -H "Authorization: token $GITHUB_TOKEN" --data @payload.json https://api.github.com/repos/$REPO/issues/$ISSUE_NUMBER/comments[0m | |
2022-07-07T12:35:58.0407266Z [36;1m fi[0m | |
2022-07-07T12:35:58.0407599Z [36;1m fi[0m | |
2022-07-07T12:35:58.0407868Z [36;1mfi[0m | |
2022-07-07T12:35:58.0957669Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0} | |
2022-07-07T12:35:58.0958172Z env: | |
2022-07-07T12:35:58.0958588Z INPUT_MESSAGE: Thanks for taking this issue! Let us know if you have any questions! | |
2022-07-07T12:35:58.0959076Z INPUT_TRIGGER: /assign | |
2022-07-07T12:35:58.0959593Z ISSUE_CURRENTLY_ASSIGNED_MESSAGE: The issue you are trying to assign to yourself is already assigned. | |
2022-07-07T12:35:58.0960516Z GITHUB_TOKEN: *** | |
2022-07-07T12:35:58.0960825Z ##[endgroup] | |
2022-07-07T12:35:58.3626827Z Cleaning up orphan processes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment