From 1b2cd520af3eeadb42d40d380ea4d72ec6977711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=CC=81ngel=20Marti=CC=81n?= Date: Thu, 3 Sep 2020 10:50:20 +0200 Subject: [PATCH] Remove unused functions --- README.md | 6 ++---- src/main.sh | 6 ------ src/teamwork.sh | 4 ---- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2722d72a..dfce4767 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/src/main.sh b/src/main.sh index 42e04309..769b2e95 100644 --- a/src/main.sh +++ b/src/main.sh @@ -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 diff --git a/src/teamwork.sh b/src/teamwork.sh index f3a7060a..3ad7be59 100644 --- a/src/teamwork.sh +++ b/src/teamwork.sh @@ -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" }