@misaelabanto/commita 0.1.2 → 0.2.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.
@@ -4,7 +4,16 @@
4
4
  "Bash(bun build:*)",
5
5
  "Bash(./commita:*)",
6
6
  "Bash(/Users/misaelabanto/Code/personal/commita/commita set:*)",
7
- "Skill(commita)"
7
+ "Skill(commita)",
8
+ "Bash(bun run:*)",
9
+ "WebFetch(domain:nvchad.com)",
10
+ "WebFetch(domain:github.com)",
11
+ "WebFetch(domain:raw.githubusercontent.com)",
12
+ "WebFetch(domain:www.reddit.com)",
13
+ "WebFetch(domain:www.lazyvim.org)",
14
+ "WebFetch(domain:mason-registry.dev)",
15
+ "WebFetch(domain:neovim.io)",
16
+ "Bash(curl -sL \"https://api.github.com/repos/NvChad/ui/git/trees/main?recursive=1\" 2>/dev/null | python3 -c \"import sys,json; [print\\(t['path']\\) for t in json.load\\(sys.stdin\\).get\\('tree',[]\\) if 'lsp' in t['path'].lower\\(\\)]\" 2>/dev/null)"
8
17
  ]
9
18
  }
10
19
  }
@@ -6,23 +6,31 @@ on:
6
6
  pull_request:
7
7
  branches: [main]
8
8
 
9
+ env:
10
+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11
+
9
12
  jobs:
10
13
  build:
11
14
  name: Build ${{ matrix.output }}
12
- runs-on: ubuntu-latest
15
+ runs-on: ${{ matrix.runner }}
13
16
  strategy:
14
17
  matrix:
15
18
  include:
16
19
  - target: bun-darwin-x64
17
20
  output: commita-darwin-amd64
21
+ runner: ubuntu-latest
18
22
  - target: bun-darwin-arm64
19
23
  output: commita-darwin-arm64
24
+ runner: ubuntu-latest
20
25
  - target: bun-linux-x64
21
26
  output: commita-linux-amd64
27
+ runner: ubuntu-latest
22
28
  - target: bun-linux-arm64
23
29
  output: commita-linux-arm64
30
+ runner: ubuntu-24.04-arm
24
31
  - target: bun-windows-x64
25
32
  output: commita-windows-amd64.exe
33
+ runner: ubuntu-latest
26
34
 
27
35
  steps:
28
36
  - uses: actions/checkout@v4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@misaelabanto/commita",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "AI-powered git auto-commit tool that intelligently groups your changes and generates meaningful commit messages",
5
5
  "module": "index.ts",
6
6
  "type": "module",
@@ -11,6 +11,7 @@ export interface CommitOptions {
11
11
  all: boolean;
12
12
  ignore: string;
13
13
  push: boolean;
14
+ verify: boolean;
14
15
  config?: string;
15
16
  }
16
17
 
@@ -19,6 +20,7 @@ export class CommitHandler {
19
20
  private fileGrouper: FileGrouper;
20
21
  private aiService: AIService;
21
22
  private config: CommitaConfig;
23
+ private noVerify: boolean = false;
22
24
 
23
25
  constructor(config: CommitaConfig) {
24
26
  this.config = config;
@@ -30,6 +32,8 @@ export class CommitHandler {
30
32
  async execute(options: CommitOptions): Promise<void> {
31
33
  console.log(chalk.blue('🤖 Commita - AI-powered auto-commit\n'));
32
34
 
35
+ this.noVerify = !options.verify;
36
+
33
37
  await this.gitService.init();
34
38
 
35
39
  const boundaries = ProjectDetector.detect(this.gitService.getRootDir());
@@ -113,7 +117,7 @@ export class CommitHandler {
113
117
  console.log();
114
118
 
115
119
  await this.gitService.stageFiles(files);
116
- await this.gitService.commit(message);
120
+ await this.gitService.commit(message, { noVerify: this.noVerify });
117
121
  console.log(chalk.green(` \u2713 Committed ${files.length} ${isStaged ? 'staged' : 'unstaged'} file(s)`));
118
122
  }
119
123
  }
package/src/cli/index.ts CHANGED
@@ -17,6 +17,7 @@ export async function runCLI() {
17
17
  .option('-a, --all', 'Process all changes grouped by folders', false)
18
18
  .option('-i, --ignore <patterns>', 'Comma-separated patterns to exclude', '')
19
19
  .option('--no-push', 'Skip pushing after commit')
20
+ .option('--no-verify', 'Bypass git pre-commit and commit-msg hooks')
20
21
  .option('-c, --config <path>', 'Path to custom config file')
21
22
  .action(async (options: CommitOptions) => {
22
23
  try {
@@ -121,8 +121,12 @@ index 0000000..0000000
121
121
  await this.git.reset(['HEAD', '--', ...files]);
122
122
  }
123
123
 
124
- async commit(message: string): Promise<void> {
125
- await this.git.commit(message);
124
+ async commit(message: string, options?: { noVerify?: boolean }): Promise<void> {
125
+ if (options?.noVerify) {
126
+ await this.git.commit(message, undefined, { '--no-verify': null });
127
+ } else {
128
+ await this.git.commit(message);
129
+ }
126
130
  }
127
131
 
128
132
  async getCurrentBranch(): Promise<string> {