submission = os.getenv("submission")
comment = os.getenv("comment")
if submission and comment:
- state = "accepted" if action == "accept" else "declined"
- return accept_or_reject(build, submission, state,
- target_project, comment)
+ if action in ("accept", "reject"):
+ state = "accepted" if action == "accept" else "declined"
+ return accept_or_reject(build, submission, state,
+ target_project, comment)
+ elif action == "rebuild":
+ print "Not implemented yet"
+ elif action == "remove":
+ print "Not implemented yet"
+ else:
+ raise LocalError("Unsupported action: '%s'" % action)
elif not submission:
raise LocalError("Submision is not specified")
else: