GitHub Issue ⇨ Draft Shortcut

Updated 10072022-005357


Documentation


Social

well folks...

I finally did it. it took me a whole day (lol,) but I have finally created a reliable way to retrieve *all* contents of @GitHub Issues in a single markdown document for @draftsapp. https://t.co/AF1n6HHo1H pic.twitter.com/bU197FccAv

— 𝗗 𝗔 𝗩 𝗢 𝗗 (@NeoYokel) October 6, 2022

well folks...

I finally did it. it took me a whole day (lol,) but I have finally created a reliable way to retrieve all contents of @GitHub Issues in a single markdown document for @drafts app. https://routinehub.co/shortcut/13090

pretty happy with this one! it's certainly going to make me very happy lol. I hope some of y'all might find it useful.

https://routinehub.co/shortcut/13090

https://davidblue.wtf/issuedraft


Setup Steps

  1. Provide a GitHub Personal Access Token. (Required)
  2. Set any additional Drafts tags you'd like included beyond the issue's current labels. (Optional.)

Retrieve and concatenate GitHub Issue contents and comments into a single draft.

See: The Full Documentation

GitHubImage-Draft Source Render

This shortcut is yet another near-direct publication of one I made specifically for my own use cases. It uses GitHub's REST API to gather an Issue's content - of the original post as well as all of the comments - into a single markdown document, formatted very specifically for my own use. Out of the box, it's designed to store said document in Drafts, but even the most novice Shortcuts users should find pointing it to any other destination with markdown/plain text support very simple. (If you need help, please don't hesitate to contact me via any of the sources at the bottom of this page.)

Setup

Upon installation, you'll be asked to provide:

  1. A GitHub Personal Access Token (create one directly with this link.) This is absolutely required.
  2. Any additional tags you'd like attached to the resulting draft beyond the Issue's labels (which are attached as tags by default.) These are optional.

The shortcut is configured by default to receive Issue URLs from the Share Sheet and/or the system clipboard. Theoretically, it should remain unaffected if one should accidentally pass an Issue Comment URL (ex: https://github.com/mastodon/joinmastodon/issues/148#issuecomment-1114188033) instead of the Issue URL (ex: https://github.com/mastodon/joinmastodon/issues/148,) as the Get Item from List actions which parse out the specifying information seek by index from the root.

Format

With Shortcuts variables wrapped in }{:

# "{title}" - {owner}/{repo}
Updated `{updated}`
Created `{created}`

- [**Issue**]({link})
- @[{username}](https://github.com/{username})
- [Repository](https://github.com/{owner}/{repo})
- [Maintainer/Org](https://github.com/{owner})

---

{body}

{commentContent1}
 *{ref1}*

---
{commentContent2}
 *{ref2}*

---
{commentContent3}
 *{ref3}*

---

Below is actual demonstrative shortcut output from this Issue as input. You might also inspect the color-encoded markdown via this Gist and/or see how the result looks when rendered as a web page using my custom Drafts HTML template.

# "Screen Time for Family Members" - FifiTheBulldog/ios-settings-urls
Updated `03302021-144840`
Created `03302021-085525`

- [**Issue**](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10)
- @[bcmitri](https://github.com/bcmitri)
- [Repository](https://github.com/txt/ios-settings-urls)
- [Maintainer/Org](https://github.com/FifiTheBulldog)

---

Is there any way to get to the "Screen Time → See All Activity" screen for family members?  I see them listed on the screen below, but haven't been able to guess a path value that works.
What’s the exact path to get to a family member’s See All Activity screen manually? I know how to get to See All Activity for my own device, but I don’t have an iCloud family that I can test with.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810311207)‑[FifiTheBulldog](https://github.com/FifiTheBulldog)*

---
That's the part I'm struggling with.  I had assumed / hoped that the See All Activity part would be easy once I could get to the Family Member view.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810319059)‑[bcmitri](https://github.com/bcmitri)*

---
I meant, what’s the series of taps to get there? Ignoring the search for a URL for a moment.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810320251)‑[FifiTheBulldog](https://github.com/FifiTheBulldog)*

---
Oh...  It’s just the name of my family member from the main Screen Time view.

![796139E3-AAD1-45DC-B4D2-0C20EC7B0254](https://user-images.githubusercontent.com/53234043/113008892-d65f2100-914d-11eb-9a31-85e29ff3da4a.jpeg)

 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810324148)‑[bcmitri](https://github.com/bcmitri)*

---
What if you URL encode the family member’s name exactly as it appears on screen there, and then use that as the path?
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810326062)‑[FifiTheBulldog](https://github.com/FifiTheBulldog)*

---
To encode the name as a url, I assume I just replace the space with a %20.  Is that right?  If so, I've tried that, and it just brings me to the main Screen Time view.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810331841)‑[bcmitri](https://github.com/bcmitri)*

---
Sounds about right, assuming there’s no other characters that would need to be percent encoded.

Are there any other identifiers that could possibly be used as paths? I’m at a loss.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810518796)‑[FifiTheBulldog](https://github.com/FifiTheBulldog)*

---
Really, there's just the screen that you see above.  Clicking my family member's name brings me to the main Screen Time view for that family member.

No worries if you don't know the answer.  I just thought I'd ask.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810531554)‑[bcmitri](https://github.com/bcmitri)*

---
Hmm, all right. I’ll leave this issue open and hope that it gets an answer someday, since this would be a particularly useful one.
 *[※](https://github.com/FifiTheBulldog/ios-settings-urls/issues/10#issuecomment-810532584)‑[FifiTheBulldog](https://github.com/FifiTheBulldog)*

---

And... for the sake of thoroughness... Here's how the same example looks in the Drafts app:

iPhone 12 Pro Max Example Frame
iPhone 12 Pro Max Example Frame
iPad Pro Example Frame
iPad Pro Example Frame

Showcuts


Absolutely a rare treat to see such effort put into shortcuts these days. Love it.


Updated 10072022-005425