Skip to content

Commit

Permalink
zendesk-to-trello 1.2:
Browse files Browse the repository at this point in the history
* Only create a trello card for the requested ticket id (The search could return multiple tickets, but they are now skipped)
  • Loading branch information
matthew-parlette committed Jun 8, 2016
1 parent 8024a03 commit 518f524
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions zendesk-to-trello/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yaml
9 changes: 8 additions & 1 deletion zendesk-to-trello/zendesk-to-trello
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if __name__ == "__main__":
parser.add_argument(
'ticket', help='Ticket number to pull from trello',
type=str)
parser.add_argument('--version', action='version', version='1.1')
parser.add_argument('--version', action='version', version='1.2')
args = parser.parse_args()

# Setup logging options
Expand Down Expand Up @@ -178,6 +178,13 @@ if __name__ == "__main__":

# I don't see a way to get a ticket except by search, 2016-06-08
for ticket in zendesk.search(args.ticket, type='ticket'):
log.debug("Processing {} from ticket search...".format(ticket.id))
# Only create ticket for the ID passed in
if str(ticket.id) != str(args.ticket):
log.debug("Skipping {}, as it does not match {}".format(
ticket.id,
args.ticket))
continue
log.info("Creating trello card for #{}".format(ticket.id))
create_card(
name="{}: {}".format(
Expand Down

0 comments on commit 518f524

Please sign in to comment.