Thank you for contributing to Flatpak Automatic! This project aims to provide a secure, configurable, and systemd-native automation wrapper for Flatpak updates with Snapper integration.
By participating in this project, you agree to maintain a professional and respectful environment. Please report any issues or suggested improvements via GitHub Issues.
Fork the repository and clone it to your local machine (Fedora or another RPM-based distribution is recommended).
Ensure you have the necessary development tools installed:
sudo dnf install make rpm-build flatpak snapper systemd-devel \
rpmlint shellcheck pre-commit
# Install markdownlint-cli or markdownlint-cli2 globally via npm
npm install -g markdownlint-cli # or markdownlint-cli2
npm install -g git-cliffTo catch linting errors before pushing to GitHub, install the pre-commit hooks:
pre-commit install
# (Optional) Run against all files immediately
pre-commit run --all-files- Core Script: The main automation logic is in
src/flatpak-automatic.py. - Systemd: Units are located in
config/systemd/. - Configuration: Default environment variables are in
config/sysconfig/flatpak-automatic. - Packaging: The RPM spec template and linting configurations are in
rpm/. Debian configs are indebian/.
Before submitting a pull request, you should verify your changes using the
provided make targets:
-
Run All Lints:
make lint
This includes
shellcheckfor scripts,rpmlintfor the spec file,markdownlintfor documentation, and Python linting via pre-commit. -
Build and Verify RPMs:
make lint-rpm
-
Local Install Test:
# Test local installation to a temporary directory make install DESTDIR=./test-install
- Do NOT Manually Edit Versions or Changelogs: Version numbers in the
MakefileandCHANGELOG.mdare exclusively managed by automation (tbump). - Conventional Commits: Because the changelog is generated automatically
during a release, you must use
Conventional Commits (e.g.,
feat: add email support,fix: resolve dbus timeout). This ensures your changes are properly categorized in the final release notes.
This project enforces a specific workflow for all contributions to ensure consistency and automated release management.
- Linting Failures: If
make lintfails, check the output carefully.markdownlintis often strict about line lengths (MD013). - Branch Naming: Ensure your branch follows the
<type>/v<version>-<description>format, or the GitOps tool will reject it. - Conventional Commits: If the GitOps tool reports commit message errors, you may need to rebase and squash/reword your commits to follow the specification.
- D-Bus in Tests: Integration tests requiring D-Bus may fail in headless
environments without a session bus. Use
dbus-run-session pytestif needed.
All changes must be developed in a new branch. Branch names MUST follow this format:
<type>/v<version>-<short-description>
Where:
<type>:feat|fix|chore|refactor|docs|ci|style|test|revert|perf|build|format|deps|sec<version>: Target release version milestone (e.g.,v2.0.0)<short-description>: Kebab-case description (e.g.,update-docs)
Example: docs/v2.0.0-update-contributing-guide
- Use descriptive commit messages following Conventional Commits.
- Ensure commits are atomic and address a single concern.
- Commits must not mix refactoring with functional changes.
Contributors MUST use the provided GitOps PR CLI tool for PR creation. This tool validates branch names, enforces Conventional Commits history, and formats the PR body.
# Basic usage
./scripts/maintainer/gitops-pr-cli-tool.sh -b main -t <your-branch-name>
# Example
./scripts/maintainer/gitops-pr-cli-tool.sh -b main -t docs/v2.0.0-update-contributing-guideManual PR creation via the GitHub UI or gh pr create is discouraged as it
bypasses critical project validations.
By contributing, you agree that your contributions will be licensed under the GPL-3.0-or-later license, as specified in the LICENSE file.