Skip to content

Commit

Permalink
Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelbemartin committed Sep 3, 2020
1 parent f6b4207 commit 1b2cd52
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ name: teamwork

on:
pull_request:
types: [opened, synchronize, closed]
types: [opened, closed]
pull_request_review:
types: [submitted, edited, dismissed]
types: [submitted, dismissed]
pull_request_review_comment:
types: [created, deleted]
issue_comment:
types: [created]

jobs:
teamwork-sync:
Expand Down
6 changes: 0 additions & 6 deletions src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,14 @@ main() {

if [ "$event" == "pull_request" ] && [ "$action" == "opened" ]; then
teamwork::pull_request_opened
elif [ "$event" == "pull_request" ] && [ "$action" == "synchronize" ]; then
teamwork::pull_request_synchronize
elif [ "$event" == "pull_request" ] && [ "$action" == "closed" ]; then
teamwork::pull_request_closed
elif [ "$event" == "pull_request_review" ] && [ "$action" == "submitted" ]; then
teamwork::pull_request_review_submitted
elif [ "$event" == "pull_request_review" ] && [ "$action" == "edited" ]; then
teamwork::pull_request_review_edited
elif [ "$event" == "pull_request_review" ] && [ "$action" == "dismissed" ]; then
teamwork::pull_request_review_dismissed
elif [ "$event" == "pull_request_review_comment" ] && [ "$action" == "deleted" ]; then
teamwork::pull_request_review_comment_deleted
elif [ "$event" == "issue_comment" ] && [ "$action" == "created" ]; then
teamwork::issue_comment_created
else
log::message "Operation not allowed"
exit 0
Expand Down
4 changes: 0 additions & 4 deletions src/teamwork.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ teamwork::pull_request_review_submitted() {
"
}

teamwork::pull_request_review_edited() {
teamwork::add_comment "Review edited"
}

teamwork::pull_request_review_dismissed() {
teamwork::add_comment "Review dismissed"
}
Expand Down

0 comments on commit 1b2cd52

Please sign in to comment.