Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable user-configured commit message templates #1359

Merged
merged 10 commits into from
May 23, 2018
Prev Previous commit
Next Next commit
Make path variable available in entry commit messages.
  • Loading branch information
delucis committed May 14, 2018
commit fa24d2ed4288fb1faa019a20fb608fa4ebd8086f
4 changes: 2 additions & 2 deletions src/backends/backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class Backend {
};
}

const commitMessage = commitMessageFormatter(newEntry ? 'create' : 'update', { collection, slug: entryObj.slug }, config);
const commitMessage = commitMessageFormatter(newEntry ? 'create' : 'update', { collection, slug: entryObj.slug, path: entryObj.path }, config);

const mode = config.get("publish_mode");

Expand Down Expand Up @@ -323,7 +323,7 @@ class Backend {
throw (new Error("Not allowed to delete entries in this collection"));
}

const commitMessage = commitMessageFormatter('delete', { collection, slug }, config);
const commitMessage = commitMessageFormatter('delete', { collection, slug, path }, config);
return this.implementation.deleteFile(path, commitMessage);
}

Expand Down