First off, thank you for considering contributing to this project.
All members of our community must follow our Code of Conduct. Please make sure you are welcoming and friendly in all of our spaces. Please report any unacceptable behavior to me@milmazz.uno.
You can contribute to this project doing the following:
- Writing tutorials or blog posts
- Improving the documentation
- Helping us tackle existing issues
- Submitting bug reports
The list of GitHub issues may give you some ideas on how to contribute, please keep every Pull Request as focused as possible, do not try to cover too much stuff in one Pull Request.
For proposing new features, please start a discussion first, remember that it is your job to explain why a feature is useful for us and how this change will impact the codebase. Be nice!
Below are the guidelines for working on Pull Requests:
Workflow
- Fork it!
- Clone your fork:
git clone https://github.com/<username>/hunter - Create your feature branch:
git checkout -b new-feature - Commit your changes:
git commit -am 'New cool feature' - Push your branch:
git push origin new-feature - Create new Pull Request
Documentation
- Should be easy to read
- Keep the first paragraph of the documentation as succinct as possible, usually one line.
- No spelling mistakes
- No orthographic mistakes
- No Markdown syntax errors
- Try to follow Elixir's Writing Documentation guidelines
- Verify the documentation results after processing with ExDoc
Running the test suite
mix test— fast, offline unit suite (integration tests are excluded).Integration tests run against a real Mastodon server:
./scripts/ci/setup_mastodon.sh source scripts/ci/.env.hunter mix test --only integrationRequires Docker. The stack is disposable:
docker compose -f docker-compose.ci.yml down -v. You can also point the suite at any instance you own by exportingHUNTER_BASE_URL,HUNTER_TOKEN,HUNTER_TOKEN2,HUNTER_PASSWORD2(the account password for the second user, used by the auth-flow test), andHUNTER_OAUTH_CLIENT_ID/HUNTER_OAUTH_CLIENT_SECRET/HUNTER_OAUTH_CODE(an app and a fresh authorization code for the OAuth-flow test) yourself. Authorization codes are single-use: re-runscripts/ci/setup_mastodon.sh(or mint a new code) before re-running the suite.
New features or bug fixes
- Please follow the Elixir Style Guide
- The codebase is not perfect at this moment, but we expect that you do not introduce new code style violations.
- Unit tests must pass
- Please verify your changes. It is highly recommended to include new tests to the test suite with every new feature or fix that you introduce.