When contributing to this repository, please first raise a new issue or discuss on an existing issue.
- Find/Create a Issue > Fork the repo > work on your branch (name =
feature/nameOfFeature
). - Verify lint report. Detekt and ktlint check will automatically happen in pre-commit hook.
gradlew lint
- push > wait for CI pipeline to complete > verify the reports in artifacts.
- Wait for your changes to be merged.
- Run the app, find issues and raise one in github
- OR see the issues section in github, leave a comment on a issue on which you want to work. If no one is working on it then it will be assigned to you and you can start to work on it.
IMPORTANT : Follow this naming convention for new branch names : feature/nameOfFeature
4. Run the project locally and test your changes on emulator/Real device. Feel free to ask for help on slack. Everyone is beginner at first.
5. Run gradlew lint
in Android studio integrated terminal.As shown below the command will be automatically highlighted in Yellow, after this press ctrl+enter
. You can find report at this location app/build/reports/lint-results.html
. If you see a new error/warning because of your code, make sure you fix it before making a PR.
First pull latest changes from my master to your master:
git remote add upstream git://github.com/Ni3verma/Safe-Box.git
git checkout master
git pull upstream master
Now checkout your new branch and merge master in it:
git checkout yourNewBranchNameHere
git merge master
- (Not Recommended) You can commit from command line.
git add .
git commit -m'a descriptive message here'
- (Recommended way) In case you are committing from Android studio (
ctrl+K
) then make sure to select these below options and in the Author box enter in this format only :name <email>
. eg:Nitin Verma <[email protected]>
In case your commit failed, then correct issues in detekt and ktlint reports found in below locations respectively and re-commit:
app/build/reports/detekt/detekt.html
app/build/reports/ktlint/ktlintMainSourceSetCheck/ktlintMainSourceSetCheck.txt
INFO : For ktlint, errors can also be found in the terminal. INFO : Incase Detekt fails, then report will automatically open in browser NOTE : until ktlint and detekt issues are fixed, you will not be able to commit your changes.
Once commit is done, push your changes.
Open the forked repo in browser. You should see an option to create pull request.
Then in this dialog verify that:
- base is master.
- compare is your new branch.
- Able to merge is green tick.
- Fill data required in description box.
After create pull request, wait for all the checks to pass
You can also track progress in actions tab. Click on the workflow to see which steps have executed or have error. If you scroll to the bottom of a workflow then you can also see the reports. Download and verify the reports.