Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ObsidianPublisher/obsidian-github…
Browse files Browse the repository at this point in the history
…-publisher
  • Loading branch information
Mara-Li committed Feb 27, 2024
2 parents 1aeccd9 + f9dc4cd commit 45e60b0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## [7.0.1](https://github.com/obsidianMkdocs/obsidian-github-publisher/compare/7.0.0...7.0.1) (2024-02-26)


### Bug Fixes

* return default key when not found ([df269d3](https://github.com/obsidianMkdocs/obsidian-github-publisher/commit/df269d3c25893a9a1f9282543c1584cfffd47589))
* token not found when default repo is used ([c864f9b](https://github.com/obsidianMkdocs/obsidian-github-publisher/commit/c864f9befbca01352e77745aece6d02e6d2a76f2))

## [7.0.0](https://github.com/ObsidianPublisher/obsidian-github-publisher/compare/6.16.0-3...7.0.0) (2024-02-26)


Expand Down
2 changes: 1 addition & 1 deletion manifest-beta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-mkdocs-publisher",
"name": "Github Publisher",
"version": "7.0.0",
"version": "7.0.1",
"minAppVersion": "0.15.4",
"description": "Github Publisher helps you to publish your notes on a preconfigured GitHub repository, for free, and more!",
"author": "Mara-Li",
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-mkdocs-publisher",
"name": "Github Publisher",
"version": "7.0.0",
"version": "7.0.1",
"minAppVersion": "0.15.4",
"description": "Github Publisher helps you to publish your notes on a preconfigured GitHub repository, for free, and more!",
"author": "Mara-Li",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-github-publisher",
"version": "7.0.0",
"version": "7.0.1",
"description": "Github Publisher is a plugin that help you to send file in a configured Github Repository, based on a frontmatter entry state.",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default class GithubPublisher extends Plugin {
*/

async loadToken(repo?: string): Promise<string> {
if (repo=="default") repo = undefined;
const tokenPath = createTokenPath(this, this.settings.github.tokenPath);

const tokenFileExists = await this.app.vault.adapter.exists(`${tokenPath}`);
Expand All @@ -141,7 +142,7 @@ export default class GithubPublisher extends Plugin {
const tokenJSON = JSON.parse(tokenFile);
const defaultToken = tokenJSON.GITHUB_PUBLISHER_TOKEN;
if (repo)
return tokenJSON.GITHUB_PUBLISHER_REPOS[repo] ?? defaultToken;
return tokenJSON.GITHUB_PUBLISHER_REPOS?.[repo] ?? defaultToken;
return defaultToken;
}
if (tokenFile) {
Expand Down

0 comments on commit 45e60b0

Please sign in to comment.