New issue in GitHub to add card to Trello and task to Omnifocus

I have a GitHub project where I am actively coming up with ideas all the time.

I’m logging these in 3 places:

  • As an issue in the GitHub repository
  • As a card in a list in a Trello board
  • As an OmniFocus task in a project

I would like to take the GitHub issue title and issue number and create the card and the OmniFocus task. (Issue number optional but desirable.)

Ideally it’d be able to automate this on both iOS and Mac OS but I’d take either over neither.

How far do you think it is possible to get with this?

These are pretty much all internet first services. I think you could hook something up using IFTTT or Zapier with little effort!

Thank you!

I tried the IFTTT GitHub -> Trello one the other day. The problem with it is it doesn’t transfer the issue number. Maybe it’s tailorable beyond what I saw but issue number wasn’t part of the card customisation.

I suspect I’m going to have to webscrape to get the issue number. The rest is probably doable with Shortcuts and/or x-callback-url.

Still, it’s an interesting project.

I wonder if you could use a Trello power up for GitHub to get what you’re looking for. And then put the issue number in place IFTTT can see for sending to omnifocus.

1 Like

It looks like zapier provides support for using the issue number as a variable in automations!

1 Like

So, I experimented with Keyboard Maestro. I got it to prompt for an issue name, brute force the creation of an issue via Firefox, web scrape the issue number and create an Omnifocus task via the URL scheme.

Unfortunately Omnifocus just seems to prepare the task for creation and still wants confirmation.

Unless I can figure out a URL query parameter to skip the confirmation I’m going to try via AppleScript next.

Then on to the Trello part.

So the AppleScript route - on Mac - is much better than the URL route. The following executes very fast - without any confirmation dialog - and takes the task name and the project name from Keyboard Maestro variables:

tell application "Keyboard Maestro Engine"
	set taskName to getvariable "taskTitle"
	set projectName to getvariable "projectName"
end tell
tell front document of application "OmniFocus"
	set myProject to the project projectName
	tell myProject
		make new task with properties {name:taskName}
	end tell
end tell

Right! That’s a limitation of url schemes that really bugs me (I get the reasoning, but I don’t like it).

Glad your project is coming along!

1 Like

I think the Trello bit can be done one of two ways:

  1. Via their API - and I’ll need a key for that.
  2. Via Pushcut and a Shortcut that adds the card. (This - without Automation Server - will prompt me but I can cope with that.)

Funny how I can cope with a Pushcut prompt. :slight_smile: It’s because the value here includes the correct generation of the card text - from the issue number and the issue title.

1 Like

I’m awfully close to what I want now:

With Keyboard Maestro

  1. It prompts me for an issue title.
  2. It uses that to wrangle the GitHub web interface to create an issue with that title and acquire the issue number.
  3. It creates an OmniFocus task in the right project - with the combination of the issue number and the issue title.
  4. It uses a Pushcut Webhook to pop up a notification. If I tap on that notification it runs a Shortcut to create the card in the right list on the right Trello board. The input parameter is the card’s title: e.g “68 Ignore metadata on Markdown import”.

The only thing wrong with this is I would like the Pushcut notification to include the value of the input parameter on the webhook URL. I’ve forgotten how to do this. Perhaps @sliemeobn can enlighten me.

This has been a fun project - but actually useful. (I really do want new GitHub issues on my Omnifocus todo list and as a card in Trello, faithfully constructed.) I wonder if it’s worth writing up.

I feel I’ve got to ask, why are you tracking an issue in GitHub, Trello and OmniFocus?

I can see a potential reason for duplication if you tracked a personal action and a wider group/team action, but that would still only be two systems.

Out of context this appears to be an automation populating three systems to track one issue, which then has to be maintained in three systems, which seems to be generating more work, not saving the and effort, which are traditional mainstays of automation.

I’m sure I must be missing something here, but I can’t figure out what it is! :frowning_face:

1 Like

You raise an interesting point. I could probably skip Trello. Here’s the motivation:

  • GitHub issues are public - and need to be in GitHub.
  • I also want the issues in a project in my personal task list - else I am less likely to work on them.

Trello is, of course, visually appealing. But you’re right - if it hadn’t been quick to build I should probably have skipped that part. But at least it got me going with PushCut again… :slight_smile:

Actually I’m being unfair to Trello: It does allow me to do some workflow. I have 3 lists for this board:

  • Issues
  • Tasks
  • Done

I might not decide to take on an issue but if I do I can move it from Issues to Tasks. And so on.

Let’s look at it another way:

What are the options for retrieving the current open issues for a repository (actually only one of my repositories)?

I would only need Issue Number and Title.

The aim is to populate an OmniFocus project with them - or at least add any new ones to the appropriate project.