notion-github 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +12 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2789,7 +2789,7 @@ var {
2789
2789
  } = import_index.default;
2790
2790
 
2791
2791
  // package.json
2792
- var version = "0.1.13";
2792
+ var version = "0.1.14";
2793
2793
 
2794
2794
  // src/commands/create/action.ts
2795
2795
  var import_rest = require("@octokit/rest");
@@ -2818,6 +2818,7 @@ function readConfig() {
2818
2818
  }
2819
2819
 
2820
2820
  // src/commands/create/action.ts
2821
+ var import_child_process = require("child_process");
2821
2822
  async function action(options) {
2822
2823
  try {
2823
2824
  const config = readConfig();
@@ -2826,6 +2827,16 @@ async function action(options) {
2826
2827
  if (!owner || !repo) {
2827
2828
  throw new Error("Invalid repository format. Use 'owner/repo' format.");
2828
2829
  }
2830
+ console.log("Checking and pushing branches...");
2831
+ try {
2832
+ console.log("Pushing main branch...");
2833
+ (0, import_child_process.execSync)("git push -u origin main", { stdio: "inherit" });
2834
+ console.log(`Pushing ${options.head} branch...`);
2835
+ (0, import_child_process.execSync)(`git push -u origin ${options.head}`, { stdio: "inherit" });
2836
+ } catch (error) {
2837
+ console.error("Failed to push branches:", error);
2838
+ throw new Error("Failed to push branches. Please ensure you have the correct permissions.");
2839
+ }
2829
2840
  console.log("Creating PR...");
2830
2841
  try {
2831
2842
  const response = await octokit.pulls.create({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notion-github",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "GitHub and Notion integration for PR automation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",