Skip to content

Commit 89aac50

Browse files
committed
ci: logging the details of the 'notify-user' step
1 parent 3f985a1 commit 89aac50

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

.actrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
--action-offline-mode
1+
--action-offline-mode
2+
-e .github/workflows/mock_payloads/deploy_act_mock.json

.github/workflows/deploy-chatbot.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13+
- name: Debug input payload on local with ACT
14+
id: debug-local-payload
15+
if: ${{ env.ACT }}
16+
run: |
17+
echo "Locan env mock payload: ${{ toJson(github.event) }}"
18+
1319
- name: Parse Deployment Command
1420
id: parse_command
1521
run: |
@@ -86,6 +92,7 @@ jobs:
8692
const localRun = `${{ env.ACT }}` === "true";
8793
8894
if (localRun) {
95+
message += "Warning: This comment was generated from a local environment while testing the workflows by one of our devs";
8996
console.log(`Action is being runned locally by 'ACT'.
9097
Skipping the notify user on PR, but output would have been:
9198
${message}`);
@@ -94,12 +101,13 @@ jobs:
94101
95102
const prNumber = context.payload.issue.number;
96103
97-
github.rest.issues.createComment({
104+
const comment = await github.rest.issues.createComment({
98105
owner: context.repo.owner,
99106
repo: context.repo.repo,
100107
issue_number: prNumber,
101108
body: message,
102109
});
110+
console.log(`Comment REST returned data: ${comment}`);
103111
104112
# TODO: from here, isolate them in independent workflows
105113
# and just call them depending on the input by having just
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"comment": {
3+
"body": "/deploy --environment pre --project ag-summoners-sync",
4+
"user": {
5+
"login": "therustifyer"
6+
}
7+
},
8+
"issue": {
9+
"number": 1
10+
},
11+
"repository": {
12+
"name": "app-summoners-sync",
13+
"branch": "develop",
14+
"owner": {
15+
"login": "zerodaycode"
16+
}
17+
}
18+
}
19+

0 commit comments

Comments
 (0)