Skip to content

Commit 07c2d9f

Browse files
Merge branch 'master' into tag-worklow-optional
2 parents 9d8691b + 31a99c3 commit 07c2d9f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/teamwork.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ teamwork::add_tag() {
3636
local -r tag_name=$1
3737

3838
if [ "$ENV" == "test" ]; then
39-
log::message "Test - Simulate request. Task ID: $TEAMWORK_TASK_ID - Tag: ${tag_name//\"/}"
39+
log::message "Test - Simulate request. Task ID: $TEAMWORK_TASK_ID - Tag Added: ${tag_name//\"/}"
4040
return
4141
fi
4242

@@ -54,7 +54,7 @@ teamwork::remove_tag() {
5454
local -r tag_name=$1
5555

5656
if [ "$ENV" == "test" ]; then
57-
log::message "Test - Simulate request. Task ID: $TEAMWORK_TASK_ID - Tag: ${tag_name//\"/}"
57+
log::message "Test - Simulate request. Task ID: $TEAMWORK_TASK_ID - Tag Removed: ${tag_name//\"/}"
5858
return
5959
fi
6060

@@ -80,7 +80,7 @@ teamwork::pull_request_opened() {
8080
**$user** opened a PR: **$pr_title**
8181
[$pr_url]($pr_url)
8282
---
83-
${pr_body//###/####}
83+
${pr_body//###/####} \n
8484
---
8585
8686
🔢 ${pr_stats_array[0]} commits / 📝 ${pr_stats_array[1]} files updated / ${pr_stats_array[2]} additions / ${pr_stats_array[3]} deletions
@@ -102,12 +102,14 @@ teamwork::pull_request_closed() {
102102
"
103103
teamwork::add_tag "PR Merged"
104104
teamwork::remove_tag "PR Open"
105+
teamwork::remove_tag "PR Approved"
105106
else
106107
teamwork::add_comment "
107108
**$user** closed a PR without merging: **$pr_title**
108109
[$pr_url]($pr_url)
109110
"
110111
teamwork::remove_tag "PR Open"
112+
teamwork::remove_tag "PR Approved"
111113
fi
112114
}
113115

@@ -129,6 +131,7 @@ teamwork::pull_request_review_submitted() {
129131
Review: **$review_state**
130132
$comment
131133
"
134+
teamwork::add_tag "PR Approved"
132135
fi
133136
}
134137

tests/events/pull_request_opened.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"action": "opened",
33
"number": 1,
44
"pull_request": {
5-
"body": "### Task\r\n- [Implement Smart Inbox Settings](https://digitalcrew.teamwork.com/#tasks/21419431)\r\n - Implement `<ConditionsBuilder/>`\r\n - Implement `<ConditonRow/>`\r\n\r\n### Screencap\r\n#### `<ConditionsBuilder/>`\r\n![conditionsbuilder](https://user-images.githubusercontent.com/621330/52656284-abc69580-2efe-11e9-89af-9b0dab68c494.gif)\r\n\r\n#### `<ConditonRow/>`\r\n- UI Explanation\r\n![conditionrow](https://user-images.githubusercontent.com/621330/52656775-bb92a980-2eff-11e9-8492-4b550b584a1e.png)\r\n- Blank State\r\n![blankconditionrow](https://user-images.githubusercontent.com/621330/52656835-e2e97680-2eff-11e9-994e-1ff426a6b7e9.png)\r\n- Empty State for not provided values\r\n - Tags\r\n ![notags](https://user-images.githubusercontent.com/621330/52656880-fa286400-2eff-11e9-8206-fee059f08356.png)\r\n - Companies\r\n ![nocompanies](https://user-images.githubusercontent.com/621330/52656897-04e2f900-2f00-11e9-82b4-88e7f58b05d7.png)\r\n- Validation Errors\r\n - Tags\r\n ![notselectedtagerror](https://user-images.githubusercontent.com/621330/52656942-2643e500-2f00-11e9-9d06-7ec813e35c2b.png)\r\n - Companies\r\n ![notselectedcompanyerror](https://user-images.githubusercontent.com/621330/52656955-2e038980-2f00-11e9-8ede-5738fb0fdd74.png)\r\n- Row Error (loading data error)\r\n![conditionrowunexpectederror](https://user-images.githubusercontent.com/621330/52656976-3b207880-2f00-11e9-9a9f-f01c3c417715.png)\r\n- All Possible Condition Rows\r\n![allpossibleconditions](https://user-images.githubusercontent.com/621330/52657021-5be8ce00-2f00-11e9-91e1-910730e4bef6.png)",
5+
"body": "This is the body of the PR. https://xxxx.teamwork.com/#/tasks/123 https://xxx.teamwork.com/#/tasks/456",
66
"head": {
77
"repo": {
88
"full_name": "teamwork/github-sync"

0 commit comments

Comments
 (0)