Skip to content

Commit fb1ccc9

Browse files
committed
misc: revert
1 parent 917dbe6 commit fb1ccc9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/auto-label.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Devtron-auto-labeler
1+
name: Devtron-auto-labeller
22

33
on:
44
issue_comment:
@@ -25,11 +25,11 @@ jobs:
2525
ISSUE_NUMBER=$(jq -r '.issue.number // .pull_request.number' "$GITHUB_EVENT_PATH")
2626
COMMENT_AUTHOR=$(jq -r '.comment.user.login' "$GITHUB_EVENT_PATH")
2727
28-
ORG_NAME="devtron-labs"
28+
ORG_NAME="satyam-tests"
2929
3030
# Check if the person is authorized to add labels
31-
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GH_TOKEN" "https://api.github.com/orgs/$ORG_NAME/members/$COMMENT_AUTHOR")
32-
if [[ "$RESPONSE" -ne 204 ]]; then
31+
curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/orgs/$ORG_NAME/members/$COMMENT_AUTHOR" > /dev/null
32+
if [[ $? -ne 0 ]]; then
3333
gh issue comment "$ISSUE_NUMBER" --body "Hi @$COMMENT_AUTHOR, you must be a member of the organization '$ORG_NAME' to add or remove labels."
3434
echo "User '$COMMENT_AUTHOR' is not a member of the organization '$ORG_NAME'. Exiting."
3535
exit 1
@@ -53,7 +53,7 @@ jobs:
5353
fi
5454
fi
5555
56-
# Removes Label Logic
56+
# Remove Label Logic
5757
if [[ "$COMMENT_BODY" =~ ^/remove[[:space:]](.+)$ ]]; then
5858
LABEL_NAME_TO_REMOVE=$(echo "$COMMENT_BODY" | sed -n 's|/remove ||p')
5959
@@ -64,4 +64,4 @@ jobs:
6464
else
6565
echo "The label '$LABEL_NAME_TO_REMOVE' is not attached to issue #$ISSUE_NUMBER."
6666
fi
67-
fi
67+
fi

0 commit comments

Comments
 (0)