Note: If these contribution guidelines are not followed your issue or PR might be closed, so please read these instructions carefully.
- If you find a bug, please first report it using Github issues.
- First check if there is not already an issue for it; duplicated issues will be closed.
- If you'd like to submit a fix for a bug, please read the How To for how to send a Pull Request.
- Indicate on the open issue that you are working on fixing the bug and the issue will be assigned to you.
- Write
Fixes #xxxx
in your PR text, where xxxx is the issue number (if there is one). - Include a test that isolates the bug and verifies that it was fixed.
- If you'd like to add a feature to the library that doesn't already exist, feel free to describe the feature in a new GitHub issue.
- If you'd like to implement the new feature, please wait for feedback from the project maintainers before spending too much time writing the code. In some cases, enhancements may not align well with the project future development direction.
- Implement the code for the new feature and please read the How To.
- If you have suggestions for improvements to the documentation, tutorial or examples (or something else), we would love to hear about it.
- As always first file a Github issue.
- Implement the changes to the documentation, please read the How To.
For a contribution to be accepted :
- Format your code;
- Documentation should always be updated or added (if applicable);
- The PR title should start with a conventional commit prefix (
feat:
,fix:
etc).
If the contribution doesn't meet these criteria, a maintainer will discuss it with you on the issue or PR. You can still continue to add more commits to the branch you have sent the Pull Request from and it will be automatically reflected in the PR.
Open Authenticator is setup to run with the most recent stable
version of Flutter, so make sure your version
matches that :
flutter channel stable
Then, to download required dependencies, run the following command in the app directory :
flutter pub get
You will then need to configure your Firebase environment :
dart pub global activate flutterfire_cli
flutterfire configure
Now, generate the remaining files required by Open Authenticator :
dart run build_runner build
dart run slang
dart run open_authenticator:generate
- Create a new local branch from
main
(e.g.git checkout -b my-new-feature
) - Make your changes (try to split them up with one PR per feature/fix).
- When committing your changes, make sure that each commit message is clear
(e.g.
git commit -m 'My very clear commit message'
). - Push your new branch to your own fork into the same remote branch
(e.g.
git push origin my-username.my-new-feature
, replaceorigin
if you use another remote.)
When doing breaking changes a deprecation tag should be added when possible and contain a message that conveys to the user what which version that the deprecated method/field will be removed in and what method they should use instead to perform the task. The version specified should be at least two versions after the current one, such that there will be at least one stable release where the users get to see the deprecation warning and in the version after that (or a later version) the deprecated entity should be removed.
Example (if the current version is v4.1.0) :
@Deprecated('Will be removed in v4.2.0, use nonDeprecatedFeature() instead')
void deprecatedFeature() {}
Go to the pull request page of Open Authenticator and in the top of the page it will ask you if you want to open a pull request from your newly created branch.
The title of the pull request should start with a conventional commit type.
Allowed types are :
fix:
-- patches a bug and is not a new feature;feat:
-- introduces a new feature;docs:
-- updates or adds documentation or examples;test:
-- updates or adds tests;refactor:
-- refactors code but doesn't introduce any changes or additions to the public API;perf:
-- code change that improves performance;build:
-- code change that affects the build system or external dependencies;ci:
-- changes to the CI configuration files and scripts;chore:
-- other changes that don't modify source or test files;revert:
-- reverts a previous commit.
If you introduce a breaking change the conventional commit type MUST end with an exclamation
mark (e.g. feat!: Remove the position argument from PositionComponent
).
These instructions are for the maintainers of Open Authenticator.
When merging a pull request, make sure that the title of the merge commit has the correct conventional commit tag and a descriptive title. This is extra important since sometimes the title of the PR doesn't reflect what GitHub defaults to for the merge commit title (if the title has been changed during the life time of the PR for example).
All the default text should be removed from the commit message and the PR description and the instructions from the "Migration instruction" (if the PR is breaking) should be copied into the commit message.
There are a few things to think about when doing a release:
- Search through the codebase for
@Deprecated
methods/fields and remove the ones that are marked for removal in the version that you are intending to release. - Create a PR containing the changes for removing the deprecated entities.
When every steps above has been done, just use the built-in utility to automatically bump the version and push a release :
dart run open_authenticator:version
Note that you need a Github PAT that has write access to the current repository. It should be put
in a .env
file under the key GITHUB_PAT
.