Skip to content

Commit

Permalink
Merge pull request #18 from mikegrima/fixes
Browse files Browse the repository at this point in the history
Some small fixes and tweaks.
  • Loading branch information
mikegrima committed Feb 18, 2017
2 parents 373b800 + 33a9329 commit c64aed5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions basic_install.sh
Expand Up @@ -79,8 +79,12 @@ if command -v pyvenv >/dev/null 2>&1 ; then
# Install the dependencies for HubCommander:
echo "[-->] Installing HubCommander' dependencies..."
pip install plugins/

# Need to delete the "setup.py" file because it interferes with the rtmbot:
rm -f plugins/setup.py
# Need to delete the "tests/" directory, because it also interferes with the rtmbot:
rm -Rf plugins/tests

echo "[+] Completed installing HubCommander' dependencies."

echo "-------- What's left to do? --------"
Expand Down
7 changes: 5 additions & 2 deletions github/plugin.py
Expand Up @@ -814,7 +814,7 @@ def list_pull_requests(self, data, user_data):
real_org = self.org_lookup[args["org"]][0]
reponame = extract_repo_name(args["repo"])

#Check if the sent state is permitted
# Check if the sent state is permitted
state = args["state"]
if state not in self.commands["!ListPRs"]["permitted_states"]:
raise KeyError("PRStates")
Expand All @@ -831,11 +831,14 @@ def list_pull_requests(self, data, user_data):
return

except SystemExit as _:
s_str = " or ".join(["`{perm_state}`".format(perm_state=perm_state)
for perm_state in self.commands["!ListPRs"]["permitted_states"]])
send_info(data["channel"], "@{}: `!ListPRs` usage is:\n```!ListPRs <OrgThatHasRepo> "
"<Repo> <State>```\n"
"`<State>` must one of: {perm_states}\n"
"No special characters or spaces in the variables. \n"
"Run `!ListOrgs` to see the list of GitHub Organizations that I manage. "
.format(user_data["name"]), markdown=True)
.format(user_data["name"], perm_states=s_str), markdown=True)
return

# Auth?
Expand Down

0 comments on commit c64aed5

Please sign in to comment.