Skip to content

Commit

Permalink
style: remove useless console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed May 28, 2022
1 parent 7d1f383 commit 99cc800
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion mkdocsPublisher/githubInteraction/branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export class GithubBranch {
});
const mainBranch = allBranch.data.find((branch: { name: string; }) => branch.name === 'main' || branch.name === 'master');
const shaMainBranch = mainBranch.commit.sha;
console.log(mainBranch)
const branch = await this.octokit.request(
"POST" + " /repos/{owner}/{repo}/git/refs",
{
Expand Down
7 changes: 0 additions & 7 deletions mkdocsPublisher/githubInteraction/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,6 @@ export async function filterGithubFile(fileInRepo: { file: string; sha: string }
async function getAllFileFromRepo(ref="main", octokit: Octokit, settings: MkdocsPublicationSettings) {
const filesInRepo = [];
try {
const allBranch = await octokit.request('GET' +
' /repos/{owner}/{repo}/branches', {
owner: settings.githubName,
repo: settings.githubRepo,
});
const refBranch = allBranch.data.find((branch: { name: string; }) => branch.name === ref);
console.log(refBranch)
const repoContents = await octokit.request(
"GET" + " /repos/{owner}/{repo}/git/trees/{tree_sha}",
{
Expand Down
6 changes: 0 additions & 6 deletions mkdocsPublisher/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ export default class MkdocsPublication extends Plugin {
.onClick(async () => {
try {
const branchName = this.app.vault.getName() + "-" + new Date().toLocaleDateString('en-US').replace(/\//g, '-');
const allBranch = await octokit.request('GET' + ' /repos/{owner}/{repo}/branches', {
owner: this.settings.githubName,
repo: this.settings.githubRepo,
});
const mainBranch = allBranch.data.find((branch: { name: string; }) => branch.name === 'main' || branch.name === 'master');
console.log(mainBranch)
await githubBranch.newBranch(branchName);
const publishSuccess =
await publish.publish(view.file, true, branchName);
Expand Down
1 change: 0 additions & 1 deletion mkdocsPublisher/settings/stylesSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export async function autoCleanCondition(value: string, autoCleanSetting: Settin

export async function yamlFrontmatterSettings(frontmatterKeySettings: Setting, rootFolderSettings: Setting, autoCleanSetting: Setting, value: string, plugin: MkdocsPublication) {
const settings = plugin.settings;
console.log(settings.rootFolder)
if (value == 'yamlFrontmatter') {
showSettings(frontmatterKeySettings);
showSettings(rootFolderSettings);
Expand Down

0 comments on commit 99cc800

Please sign in to comment.