-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: PLATE-775: ChatOps: Instant Workflow Run link
- Loading branch information
1 parent
46384e4
commit f8f5a05
Showing
4 changed files
with
40 additions
and
20 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,15 @@ jobs: | |
steps: | ||
- uses: hmarr/[email protected] | ||
|
||
- name: Add Workflow link to command comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
- name: Check user's membership | ||
uses: actions/github-script@v7 | ||
id: check-membership | ||
|
@@ -67,8 +76,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> Docker image was pushed with the tag `${{ needs.build-docker.outputs.image_version }}` | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
|
@@ -80,7 +87,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> **Error**: failed to execute "${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}" command | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "-1" | ||
|
||
help: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: hmarr/[email protected] | ||
|
||
- name: Add Workflow link to command comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
- name: Checkout on chat command | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -91,8 +102,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> Already up-to-date. Nothing to commit. | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "confused" | ||
|
||
- name: Add reaction to command comment on success | ||
|
@@ -105,8 +114,6 @@ jobs: | |
body: | | ||
> Successfully pushed new changes | ||
> ${{ env.COMMIT_MSG_FILE }} | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
|
@@ -118,8 +125,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> **Error**: failed to get build | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "-1" | ||
|
||
help: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: hmarr/[email protected] | ||
|
||
- name: Add Workflow link to command comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
- name: Checkout on chat command | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -50,8 +61,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> **Error**: Merge conflict detected, please resolve it using the command line. | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "-1" | ||
|
||
- name: Merge branch into current branch | ||
|
@@ -82,8 +91,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> Already up-to-date. Nothing to commit. | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "confused" | ||
|
||
- name: Add reaction to command comment on success | ||
|
@@ -96,8 +103,6 @@ jobs: | |
body: | | ||
> Successfully pushed new changes: | ||
> ${{ steps.commit_and_push.outputs.last_commit_msg }} (${{ steps.commit_and_push.outputs.last_commit_sha }}) | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
|
@@ -109,8 +114,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> **Error**: failed to execute "${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}" command | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "-1" | ||
|
||
help: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,15 @@ jobs: | |
steps: | ||
- uses: hmarr/[email protected] | ||
|
||
- name: Add Workflow link to command comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
- name: Check user's membership | ||
uses: actions/github-script@v7 | ||
id: check-membership | ||
|
@@ -62,8 +71,6 @@ jobs: | |
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> Jira issue [${{ steps.jira-create-issue.outputs.key }}](${{ steps.jira-create-issue.outputs.link }}) is created | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
|
@@ -76,7 +83,6 @@ jobs: | |
body: | | ||
> **Error**: failed to execute "${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}" command | ||
> ${{ steps.check-membership.outputs.error }} | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "-1" | ||
|
||
help: | ||
|