Skip to content
Merged
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
94 changes: 94 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Bug Report
description: File a bug report to help us improve
title: "[Bug]: "
labels: ["bug", "needs-triage"]
assignees: []

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!

- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: Tell us what happened
validations:
required: true

- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. Go to '...'
2. Click on '....'
3. Enter cron expression '...'
4. See error
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What did you expect to happen?
placeholder: I expected...
validations:
required: true

- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened?
placeholder: Instead...
validations:
required: true

- type: input
id: version
attributes:
label: Version
description: What version of git-context are you running?
placeholder: v1.0.0 or commit hash
validations:
required: true

- type: dropdown
id: os
attributes:
label: Operating System
description: What OS are you using?
options:
- macOS
- Linux
- Windows
- Other
validations:
required: true

- type: input
id: terminal
attributes:
label: Terminal
description: What terminal emulator are you using?
placeholder: e.g., iTerm2, Terminal.app, Alacritty, etc.

- type: textarea
id: logs
attributes:
label: Logs
description: Please copy and paste any relevant log output or error messages
render: shell

- type: textarea
id: context
attributes:
label: Additional Context
description: Add any other context about the problem here
placeholder: Screenshots, GIFs, or additional information
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Discussions
url: https://github.com/techquestsdev/macos-free/discussions
about: Ask questions and discuss ideas with the community
- name: 📖 Documentation
url: https://github.com/techquestsdev/macos-free#readme
about: Read the documentation for help and examples
72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Feature Request
description: Suggest an idea for this project
title: "[Feature]: "
labels: ["enhancement", "needs-triage"]
assignees: []

body:
- type: markdown
attributes:
value: |
Thanks for suggesting a new feature!

- type: textarea
id: problem
attributes:
label: Problem Statement
description: Is your feature request related to a problem? Please describe.
placeholder: I'm frustrated when...
validations:
required: true

- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like
placeholder: I would like to see...
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe alternatives you've considered
placeholder: I also thought about...

- type: textarea
id: examples
attributes:
label: Examples
description: Provide examples of how this feature would be used
placeholder: |
Example 1: ...
Example 2: ...

- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to you?
options:
- Nice to have
- Important
- Critical
validations:
required: true

- type: checkboxes
id: contribution
attributes:
label: Contribution
description: Would you be willing to contribute this feature?
options:
- label: I am willing to submit a PR for this feature
required: false

- type: textarea
id: context
attributes:
label: Additional Context
description: Add any other context, screenshots, or mockups about the feature request here
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"
commit-message:
prefix: "chore"
include: "scope"
54 changes: 54 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Pull Request

## Description
<!-- Provide a brief description of the changes in this PR -->

## Type of Change
<!-- Mark the relevant option with an "x" -->

- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] 📝 Documentation update
- [ ] 🎨 Code style update (formatting, renaming)
- [ ] ♻️ Code refactoring (no functional changes)
- [ ] ⚡ Performance improvement
- [ ] ✅ Test update
- [ ] 🔒 Security fix

## Related Issues
<!-- Link to related issues -->
Fixes #(issue number)
Related to #(issue number)

## Changes Made
<!-- List the specific changes made in this PR -->

-
-
-

## Testing
<!-- Describe the tests you ran to verify your changes -->

- [ ] Existing tests pass (`make test`)
- [ ] New tests added (if applicable)
- [ ] Manual testing performed

## Screenshots/Recordings
<!-- If applicable, add screenshots or recordings to demonstrate the changes -->

## Checklist
<!-- Mark completed items with an "x" -->

- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published

## Additional Notes
<!-- Add any additional notes for reviewers -->
126 changes: 126 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: CI

on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]

jobs:
build:
name: Build & Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install Xcode Command Line Tools
run: |
if ! xcode-select -p &>/dev/null; then
xcode-select --install
fi

- name: Build
run: make

- name: Run tests
run: make test

- name: Build debug version
run: make debug

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: macos-free-darwin
path: bin/free

semantic-version:
name: Semantic Version
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [build]
outputs:
new_tag: ${{ steps.tag.outputs.new_tag }}
changelog: ${{ steps.tag.outputs.changelog }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get latest tag
id: get_tag
run: |
LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
echo "Latest tag: $LATEST_TAG"

- name: Determine version bump
id: bump
run: |
COMMIT_MSG=$(git log -1 --pretty=%B)
echo "Commit message: $COMMIT_MSG"

if echo "$COMMIT_MSG" | grep -qiE '^(feat|fix|perf|refactor|style|test|docs|chore)!:' || echo "$COMMIT_MSG" | grep -qi 'BREAKING CHANGE'; then
BUMP_TYPE="major"
elif echo "$COMMIT_MSG" | grep -qiE '^feat(\(.+\))?:'; then
BUMP_TYPE="minor"
elif echo "$COMMIT_MSG" | grep -qiE '^(fix|perf)(\(.+\))?:'; then
BUMP_TYPE="patch"
else
BUMP_TYPE="none"
fi

echo "bump_type=$BUMP_TYPE" >> $GITHUB_OUTPUT
echo "Bump type: $BUMP_TYPE"

- name: Calculate new version
id: tag
run: |
LATEST_TAG="${{ steps.get_tag.outputs.latest_tag }}"
BUMP_TYPE="${{ steps.bump.outputs.bump_type }}"

if [ "$BUMP_TYPE" = "none" ]; then
echo "No semantic commit detected, skipping versioning"
echo "new_tag=" >> $GITHUB_OUTPUT
exit 0
fi

VERSION=${LATEST_TAG#v}
IFS='.' read -r -a VERSION_PARTS <<< "$VERSION"
MAJOR=${VERSION_PARTS[0]:-0}
MINOR=${VERSION_PARTS[1]:-0}
PATCH=${VERSION_PARTS[2]:-0}

case $BUMP_TYPE in
major)
MAJOR=$((MAJOR + 1))
MINOR=0
PATCH=0
;;
minor)
MINOR=$((MINOR + 1))
PATCH=0
;;
patch)
PATCH=$((PATCH + 1))
;;
esac

NEW_TAG="v${MAJOR}.${MINOR}.${PATCH}"
echo "new_tag=$NEW_TAG" >> $GITHUB_OUTPUT
echo "New tag: $NEW_TAG"

COMMIT_MSG=$(git log -1 --pretty=%B)
echo "changelog=$COMMIT_MSG" >> $GITHUB_OUTPUT

- name: Create and push tag
if: steps.tag.outputs.new_tag != ''
run: |
NEW_TAG="${{ steps.tag.outputs.new_tag }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "$NEW_TAG" -m "Release $NEW_TAG"
git push origin "$NEW_TAG"
echo "✓ Created and pushed tag: $NEW_TAG"
Loading