No description
Find a file
Nathan Smith 004f507a42 🤖 ci: #31 Add release workflow
Drafts a new release when a tag is pushed

Closes: #31
2024-02-10 04:38:13 +00:00
.github/workflows 🤖 ci: #31 Add release workflow 2024-02-10 04:38:13 +00:00
doc 📚 docs: Add query docs and sample images 2024-02-01 23:27:38 -05:00
src 🐛 fix: #25 Allow for string or string array of labels for issue lists 2024-02-09 20:24:07 +00:00
.better-commits.json feat: #11 Add predefined PR table columns 2024-02-01 22:37:39 -05:00
.editorconfig initial commit 2024-01-03 22:03:23 +00:00
.eslintignore initial commit 2024-01-03 22:03:23 +00:00
.eslintrc kind of working in live preview, just need to make sure we're not constantly re-rendering 2024-01-08 19:15:59 +00:00
.gitignore initial commit 2024-01-03 22:03:23 +00:00
.npmrc initial commit 2024-01-03 22:03:23 +00:00
.prettierrc working multi-account support and parsing of links 2024-01-04 21:38:43 +00:00
CHANGELOG.md 🚀 release: #25 Release v0.2.0 2024-02-09 20:51:56 +00:00
esbuild.config.mjs initial commit 2024-01-03 22:03:23 +00:00
LICENSE Initial commit 2024-01-02 21:35:51 -05:00
main.ts initial commit 2024-01-03 22:03:23 +00:00
manifest.json 🚀 release: #25 Release v0.2.0 2024-02-09 20:51:56 +00:00
package-lock.json 🚀 release: #25 Release v0.2.0 2024-02-09 20:51:56 +00:00
package.json 🚀 release: #25 Release v0.2.0 2024-02-09 20:51:56 +00:00
README.md 📚 docs: Make the warning on token security clearer 2024-02-09 21:14:47 +00:00
styles.css feat: #11 Add predefined PR table columns 2024-02-01 22:37:39 -05:00
tsconfig.json working multi-account support and parsing of links 2024-01-04 21:38:43 +00:00
version-bump.mjs initial commit 2024-01-03 22:03:23 +00:00
versions.json 🚀 release: #25 Release v0.2.0 2024-02-09 20:51:56 +00:00

GitHub Link

Obsidian + GitHub ❤️

Transform boring GitHub links in notes into tags with rich content from GitHub's API.

Use

Github links are automatically transformed into tags. For example, pasting https://github.com/nathonius/obsidian-github-link/issues/1 into a note will become:

ExampleTag

Table

You can also include a table with results from a search query using a github-query codeblock. For example:

```github-query
outputType: table
queryType: pull-request
query: "is:pr repo:nathonius/obsidian-github-link"
columns: [number, title, author, status]
```

This produces a table of results that refreshes upon opening the note.

ExampleTable

The codeblock must be valid YAML. The following options are currently supported:

Option Values Description
outputType table Required. Only table is currently supported.
queryType issue, pull-request Required.
columns See Supported Columns list below. Required. Should be an array of values.
query A valid GitHub search query. Required for custom queries, overrides other params. See the GitHub docs for more information.

Other params will depend on the type of query. If the query parameter is provided, these other parameters will be ignored. Each section below describes a set of parameters for a certain query profile.

List My Assigned Issues

Note: this requires a valid token.

Option Values Description
org Name of a user or organization. Will use token for default account if not given.
filter assigned, created, mentioned, subscribed, repos, all What type of issues to return. all and repos return all issues, regardless of participation.
state open, closed, all
labels Label or array of issue labels. Only matching issues will be included.
sort created, updated, comments
direction desc, asc
since YYYY-MM-DDTHH:MM:SSZ Minimum update date, in full ISO format.
per_page Integer. Number of items to return per-page.
page Integer. Page of results to use.

List Issues For Repo

Option Values Description
org Name of a user or organization. Required.
repo Repository name. Required.
milestone Issue milestone, milestone number, *, none.
state open, closed, all
assignee Name of a user, *, none.
creator Name of a user.
mentioned Name of a user.
labels Label or array of issue labels. Only matching issues will be included.
sort created, updated, comments
direction desc, asc
since YYYY-MM-DDTHH:MM:SSZ Minimum update date, in full ISO format.
per_page Integer. Number of items to return per-page.
page Integer. Page of results to use.

List Pull Requests For Repo

Option Values Description
org Name of a user or organization. Required.
repo Repository name. Required.
state open, closed, all
head user:ref-name or org:ref-name. Filter to head user or org with branch name.
base branch-name-base Filter by base branch name.
sort created, updated, popularity, long-running
direction desc, asc
per_page Integer. Number of items to return per-page.
page Integer. Page of results to use.

Supported Columns

Any column not listed below can still be used if it is included in the API response. Nested values can be used by giving the json object notation string to reference the value. For example, user.login will get the raw value of the username from the API query response.

Column Types Description
number pull-request The PR number and a link to the PR.
repo pull-request A link to the repository.
author pull-request The user who created the PR along with a small avatar.
status pull-request The current status of the pull request.
created, updated, closed pull-request Formatted versions of the create, last update, and close date.

Setup

For public repositories, no extra configuration is required. For private repos, you'll need to log in through GitHub.

Authentication

⚠️ WARNING: Tokens will be stored in plain text. Use at your own risk.

Authentication only requires a GitHub account. In GitHub Link plugin settings, add a new account. Give the account a name.

The plugin supports an automated authentication flow, or you can generate your own token. To use the automated flow, select "Generate Token". In the modal that appears, copy the code and open the authentication link. After pasting the auth link, you'll be prompted to allow access to the GitHub Link plugin. Once accepted, you can return to Obsidian and the token will be saved automatically.

Plugin Compatibility

There are other plugins that provide some similar functionality:

These and GitHub Link are unlikely to be compatible and should not currently be used together.