Skip to content

Commit

Permalink
Evaluating Windows support (#25)
Browse files Browse the repository at this point in the history
* Test windows support
  • Loading branch information
archive committed Jun 13, 2021
1 parent ef22b93 commit 4dc5ae7
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
slack-optional-as_user: false

- name: Result from "Send Slack Message"
run: echo "${{ steps.send-message.outputs.slack-result }}"
run: echo '${{ steps.send-message.outputs.slack-result }}'
4 changes: 2 additions & 2 deletions .github/workflows/slack-notification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, issues]

jobs:
slack-notification:
runs-on: ubuntu-20.04
runs-on: windows-2019
name: Test 2 (Sends message on Push and Issue)

steps:
Expand All @@ -17,4 +17,4 @@ jobs:
slack-text: Test 2 - 🤓 With Event name "${{ github.event_name }}" and Repo "${{ github.repository }}" [at mater]

- name: Result from "Send Slack Message"
run: echo "${{ steps.send-message.outputs.slack-result }}"
run: echo '${{ steps.send-message.outputs.slack-result }}'
6 changes: 3 additions & 3 deletions .github/workflows/slack-reaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
slack-text: Test 3 - Message to send a react to [at master]

- name: Send Slack Message Result
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}"
run: echo 'Data - ${{ steps.send-message.outputs.slack-result }}'

- name: Some step in between
run: echo "..."
run: echo '...'

- name: Send Slack Reaction To Message
uses: archive/github-actions-slack@master
Expand All @@ -34,4 +34,4 @@ jobs:
slack-message-timestamp: ${{ fromJson(steps.send-message.outputs.slack-result).response.message.ts }}

- name: Send Slack Reaction To Message Result
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}"
run: echo 'Data - ${{ steps.send-message.outputs.slack-result }}'
6 changes: 3 additions & 3 deletions .github/workflows/slack-thread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
slack-text: Test 4 - Message to send thread to [at master]

- name: Send "Slack Message" Result
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}"
run: echo 'Data - ${{ steps.send-message.outputs.slack-result }}'

- name: Some step in between
run: echo "..."
run: echo '...'

- name: Send Thread Message
uses: archive/github-actions-slack@master
Expand All @@ -35,4 +35,4 @@ jobs:
#slack-optional-reply_broadcast: true # To broadcast thread reply in channel

- name: Send "Send Thread Message" Result
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}"
run: echo 'Data - ${{ steps.send-message.outputs.slack-result }}'
6 changes: 3 additions & 3 deletions .github/workflows/slack-update-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
slack-text: Test 5 - Message to update [at master]

- name: Send Slack Message Result
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}"
run: echo 'Data - ${{ steps.send-message.outputs.slack-result }}'

- name: Some step in between
run: echo "..."
run: echo '...'

- name: Send Slack Reaction To Message
uses: archive/github-actions-slack@master
Expand All @@ -34,4 +34,4 @@ jobs:
slack-update-message-ts: ${{ fromJson(steps.send-message.outputs.slack-result).response.message.ts }}

- name: Send Slack Reaction To Message Result
run: echo "Data - ${{ steps.send-message.outputs.slack-result }}"
run: echo 'Data - ${{ steps.send-message.outputs.slack-result }}'
3 changes: 3 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,10 @@ const addReaction = async () => {
const messageTimestamp = context.getRequired("slack-message-timestamp");

const payload = buildMessage(channelId, emojiName, messageTimestamp);

context.debugExtra("Add Reaction PAYLOAD", payload);
const result = await apiAddReaction(token, payload);
context.debugExtra("Add Reaction PAYLOAD", result);

const resultAsJson = jsonPretty(result);
context.setOutput("slack-result", resultAsJson);
Expand Down
3 changes: 3 additions & 0 deletions src/reaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const addReaction = async () => {
const messageTimestamp = context.getRequired("slack-message-timestamp");

const payload = buildMessage(channelId, emojiName, messageTimestamp);

context.debugExtra("Add Reaction PAYLOAD", payload);
const result = await apiAddReaction(token, payload);
context.debugExtra("Add Reaction PAYLOAD", result);

const resultAsJson = jsonPretty(result);
context.setOutput("slack-result", resultAsJson);
Expand Down

0 comments on commit 4dc5ae7

Please sign in to comment.