codeowners-git 1.0.4 → 1.1.0

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 (3) hide show
  1. package/README.md +10 -0
  2. package/dist/cli.js +11 -5
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -12,6 +12,10 @@ Managing large-scale migrations in big monorepos with multiple codeowners can be
12
12
  - Creating compact, team-specific branches with only their affected files.
13
13
  - Streamlining the review process with smaller, targeted PRs.
14
14
 
15
+ https://github.com/user-attachments/assets/7cc0a924-f03e-47f3-baad-63eca9e8e4a8
16
+
17
+
18
+
15
19
  ## Installation
16
20
 
17
21
  ### Using npx (recommended)
@@ -80,6 +84,7 @@ Options:
80
84
  - `--owner, -o` Specify owner(s) to add/remove
81
85
  - `--branch, -b` Specify branch pattern
82
86
  - `--message, -m` Commit message for changes
87
+ - `--no-verify, -n` Skips lint-staged and other checks before committing
83
88
 
84
89
  Example:
85
90
 
@@ -105,6 +110,11 @@ bun test
105
110
 
106
111
  5. Submit a pull request
107
112
 
113
+ ## Alternatives
114
+ [@snyk/github-codeowners](https://github.com/snyk/github-codeowners)
115
+
116
+ [codeowners](https://github.com/beaugunderson/codeowners)
117
+
108
118
  ## License
109
119
 
110
120
  MIT ©
package/dist/cli.js CHANGED
@@ -14614,11 +14614,14 @@ var checkout = async (name) => {
14614
14614
  log.info(`Switching to branch: "${name}"`);
14615
14615
  await git.checkout(name);
14616
14616
  };
14617
- var commitChanges = async (files, message) => {
14617
+ var commitChanges = async (files, { message, noVerify = false }) => {
14618
14618
  log.info("Adding files to commit...");
14619
14619
  await git.add(files);
14620
+ const commitOptions = noVerify ? ["--no-verify"] : [];
14620
14621
  log.info(`Running commit with message: "${message}"`);
14621
- await git.commit(message);
14622
+ await git.commit(message, [], {
14623
+ ...noVerify ? { "--no-verify": null } : {}
14624
+ });
14622
14625
  log.info("Commit finished successfully.");
14623
14626
  };
14624
14627
  var getCurrentBranch = async () => {
@@ -14717,8 +14720,11 @@ var branch = async (options) => {
14717
14720
  try {
14718
14721
  log.info(`Creating new branch "${options.branch}"...`);
14719
14722
  await createBranch(options.branch);
14720
- log.info(`Committing changes with message: "${options.message}"...`);
14721
- await commitChanges(filesToCommit, options.message);
14723
+ log.info(`Committing changes with message: "${options.message}" ${!options.verify}...`);
14724
+ await commitChanges(filesToCommit, {
14725
+ message: options.message ?? "",
14726
+ noVerify: !options.verify
14727
+ });
14722
14728
  } finally {
14723
14729
  log.info(`Checking out original branch "${originalBranch}"...`);
14724
14730
  await checkout(originalBranch);
@@ -14734,5 +14740,5 @@ var branch = async (options) => {
14734
14740
  var program2 = new Command;
14735
14741
  program2.name("codeowners").description("CLI tool for grouping and managing staged files by CODEOWNERS");
14736
14742
  program2.command("list").description("Lists all git changed files by CODEOWNER").option("-o, --owner <owner>", "Filter by specific code owner").option("-i, --include <patterns>", "Filter by owner patterns").action(listCodeowners);
14737
- program2.command("branch").description("Create new branch with codeowner changes").requiredOption("-o, --owner <owner>", "Code owner name").requiredOption("-b, --branch <branch>", "Branch name").requiredOption("-m, --message <message>", "Commit message").action(branch);
14743
+ program2.command("branch").description("Create new branch with codeowner changes").requiredOption("-o, --owner <owner>", "Code owner name").requiredOption("-b, --branch <branch>", "Branch name").requiredOption("-m, --message <message>", "Commit message").option("-n, --no-verify", "Skip lint-staged or any other ci checks").action(branch);
14738
14744
  program2.parse(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeowners-git",
3
- "version": "1.0.4",
3
+ "version": "1.1.0",
4
4
  "module": "src/cli.ts",
5
5
  "type": "module",
6
6
  "private": false,
@@ -12,8 +12,8 @@
12
12
  },
13
13
  "author": "hemandev",
14
14
  "engines": {
15
- "node": ">=17.x",
16
- "npm": ">=8.x <9"
15
+ "node": ">=18.x",
16
+ "npm": ">=8.x"
17
17
  },
18
18
  "keywords": [
19
19
  "codeowners",