Skip to content

Commit

Permalink
beta: logging event of merging
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Jul 7, 2022
1 parent e8dbb2f commit fbaed18
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion mkdocsPublisher/githubInteraction/branch.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Octokit} from "@octokit/core";
import {MkdocsPublicationSettings} from "../settings/interface";
import {FilesManagement} from "./filesManagement";
import {MetadataCache, Vault} from "obsidian";
import {MetadataCache, Vault, Notice} from "obsidian";

export class GithubBranch extends FilesManagement {
settings: MkdocsPublicationSettings;
Expand Down Expand Up @@ -85,6 +85,7 @@ export class GithubBranch extends FilesManagement {


async mergePullRequest (branchName: string, silent = false, pullRequestNumber: number) {
new Notice('Trying to merge request with pull request number ' + pullRequestNumber + ' in ' + branchName);
const octokit = new Octokit({
auth: this.settings.GhToken,
});
Expand Down
1 change: 0 additions & 1 deletion mkdocsPublisher/utils/convertText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function convertLinkCitation(fileContent: string, settings: MkdocsPublicationSet
const matchedLink = fileContent.match(regexToReplace);
if (matchedLink) {
for (const link of matchedLink) {
new Notice(`${pathInGithub}`);
const regToReplace = new RegExp(`${linkedFile.linkFrom}`);
const newLink = link.replace(regToReplace, pathInGithub); //strict replacement of link
fileContent = fileContent.replace(link, newLink);
Expand Down
1 change: 0 additions & 1 deletion mkdocsPublisher/utils/filePathConvertor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function createRelativePath(sourceFile: TFile, targetFile: {linked: TFile, linkF
const sourcePath = getReceiptFolder(sourceFile, settings, metadata);
const frontmatter = metadata.getCache(targetFile.linked.path) ? metadata.getCache(targetFile.linked.path).frontmatter : null;
if (targetFile.linked.extension === '.md' && (!frontmatter || !frontmatter[settings.shareKey])) {
new Notice('Nothing to see here ;)')
return targetFile.altText;
}
const targetPath = targetFile.linked.extension === 'md' ? getReceiptFolder(targetFile.linked, settings, metadata) : getImageLinkOptions(targetFile.linked, settings);
Expand Down

0 comments on commit fbaed18

Please sign in to comment.