First off, thank you for considering contributing to Jamf Connect Monitor! It's people like you that make this project better for the entire macOS administrator community.
- Code of Conduct
- Getting Started
- How Can I Contribute?
- Development Setup
- Pull Request Process
- Style Guide
- Testing
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
- macOS 10.14 or later
- Jamf Connect installed
- Jamf Pro access (for testing)
- Basic knowledge of Bash scripting
- Understanding of Jamf Pro Extension Attributes
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/jamf-connect-monitor.git cd jamf-connect-monitor - Set up the development environment:
./scripts/dev-setup.sh
Before creating bug reports, please check the existing issues as you might find that the bug has already been reported. When you create a bug report, please include as many details as possible:
- Use a clear and descriptive title
- Describe the exact steps to reproduce the problem
- Provide specific examples
- Include macOS version and Jamf Connect version
- Include relevant log files
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
- Use a clear and descriptive title
- Provide a step-by-step description of the suggested enhancement
- Provide specific examples to demonstrate the enhancement
- Explain why this enhancement would be useful
Unsure where to begin? You can start by looking through these beginner-friendly issues:
good-first-issue- issues which should only require a few lines of codehelp-wanted- issues which should be a bit more involved
- Follow the style guide
- Include tests for any new functionality
- Update documentation as needed
- Ensure all tests pass
- Include a clear commit message
# Create test environment
sudo ./scripts/create-test-env.sh
# Run tests
sudo ./scripts/run-tests.sh
# Test package creation
sudo ./scripts/package_creation_script.sh build- Set up a test computer in Jamf Pro
- Deploy your changes via policy
- Verify functionality with Extension Attribute
- Check logs for proper operation
-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Make your changes following the style guide
-
Test thoroughly:
- Run local tests
- Test on actual Jamf Connect system
- Verify Extension Attribute functionality
- Check all log outputs
-
Update documentation if needed:
- Update README.md
- Update CHANGELOG.md
- Add/update code comments
-
Commit with clear messages:
git commit -m "Add feature: brief description Longer explanation of what this commit does and why. Fixes #123"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request with:
- Clear title and description
- Reference to any related issues
- Test results and verification steps
- Use
#!/bin/bashshebang for all scripts - Use 4-space indentation
- Include comprehensive error handling
- Add logging for all major operations
- Use meaningful variable names
- Include function documentation
- Follow existing code patterns
#!/bin/bash
# Function: check_admin_status
# Description: Checks if user has admin privileges
# Parameters: $1 - username to check
# Returns: 0 if admin, 1 if not admin
check_admin_status() {
local username="$1"
if [[ -z "$username" ]]; then
log_message "ERROR" "Username parameter required"
return 1
fi
if dsmemberutil checkmembership -U "$username" -G admin | grep -q "user is a member"; then
log_message "INFO" "User $username has admin privileges"
return 0
else
log_message "INFO" "User $username does not have admin privileges"
return 1
fi
}- Use clear, concise language
- Include code examples where appropriate
- Update documentation with any functional changes
- Follow Markdown best practices
- Use present tense ("Add feature" not "Added feature")
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit first line to 72 characters or less
- Reference issues and pull requests when appropriate
Before submitting a pull request, ensure:
-
Script functionality tests:
- Monitor script executes without errors
- LaunchDaemon loads and runs properly
- Extension Attribute returns expected results
-
Integration tests:
- Jamf Connect elevation detection works
- Admin removal functions correctly
- Notifications send properly
-
Edge case tests:
- Handles missing files gracefully
- Proper error handling for invalid inputs
- Works with various Jamf Connect configurations
# Set up test environment
sudo ./scripts/test-setup.sh
# Run all tests
sudo ./scripts/run-all-tests.sh
# Clean up test environment
sudo ./scripts/test-cleanup.sh- Update version numbers in relevant files
- Update CHANGELOG.md with new features/fixes
- Create release branch
- Test thoroughly on multiple systems
- Submit pull request to main
- Tag release after merge
- Create GitHub release with binaries
- GitHub Issues: Report bugs or request features
- Documentation: Check the docs/ folder for guides
Thank you for contributing to Jamf Connect Monitor! 🎉