Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .brewiz/bin/packages-updater
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def read_action_block
content = content.sub(/^{{ACTION}}\s*/, '')

begin
parsed = YAML.safe_load(content, [Date, Time])
parsed = YAML.safe_load(content, permitted_classes: [Date, Time])
rescue Psych::SyntaxError => e
abort "Failed to parse ACTION payload as YAML: #{e.message}"
end
Expand Down
45 changes: 45 additions & 0 deletions .github/prompts/commit.prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Conventional Commit Message Generator

## Purpose
Generate conventional commit messages for staged changes in the brewiz repository.

## Instructions

You are a commit message generator. Analyze the staged changes and generate a **conventional commit message** following this format:

```
<type>(<scope>): <subject>

<body>

[optional footer]
```

### Guidelines

1. **Type**: Choose from: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`
2. **Scope**: The affected area (e.g., `packages`, `package-manager`, `ui`, `docs`)
3. **Subject**:
- Imperative mood ("add" not "added")
- Lowercase
- No period at end
- Max 50 characters
4. **Body**:
- Describe WHAT changed and HOW (not why)
- Wrap at 72 characters
- Use bullet points for multiple changes
- Be specific and technical
5. **Footer**: Reference issues if applicable (e.g., `Fixes #123`)

### What to Include
- Technical changes made
- Files modified
- Methods or functions affected
- Configuration updates
- Data structure changes

### What to Exclude
- Business reasons
- Problem justification
- User impact explanations
- Contextual backstory
127 changes: 95 additions & 32 deletions .github/prompts/update.prompt.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/src/utils/BrewCommandsUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function generateBrewCommands(categories, selectedPackages, outdatedPacka
addUninstallCommands(commands, selectedPkgs);
}
addOutdatedPackagesCommand(commands, outdatedPackages);
commands.push("brew cleanup # Consider to remove old versions and free disk space");
commands.push("brew autoremove && brew cleanup # Consider running to remove unused dependencies and free disk space");

return commands;
}
Expand Down
9 changes: 8 additions & 1 deletion bin/beautify-packages-yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ class PackageBeautifier
def beautify
# Load YAML data with error handling
begin
data = YAML.load_file(@input_file)
# Load all documents from the YAML stream
docs = YAML.load_stream(File.read(@input_file))
# Find the document that contains the categories array
data = docs.find { |d| d.is_a?(Array) }
unless data
puts "Error: Could not find categories array in '#{@input_file}'"
exit 1
end
rescue Errno::ENOENT
puts "Error: Input file '#{@input_file}' not found."
exit 1
Expand Down
6 changes: 5 additions & 1 deletion bin/brewiz
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ class PackageManager

@packages.each do |category|
category['packages'].map! do |pkg|
pkg.merge(brew_info.delete(pkg['id']) || {}).select { |_, v| v }
# Preserve tags if they exist in the original package
tags = pkg['tags']
merged = pkg.merge(brew_info.delete(pkg['id']) || {}).select { |_, v| v }
merged['tags'] = tags if tags
merged
end
category['packages'].sort_by! { |pkg| pkg['name'].downcase }
end
Expand Down
Loading