Want to contribute? Developers of any skill level can find opportunities to contribute. Bug reports, fixes, documentation improvements, enhancements, and ideas are all welcome!
If you are new to Pastepwn or open-source development in general, checking out the Github "Issues" tab is recommended. There, you can find everything from bugs in need of fixes to requests for documentation and more.
For newer developers, it's recommended to start with issues with the labels, "Difficulty: Easy" and/or "good first issue".
If you have discovered a bug or want to request an enhancement, you will need to create a New Issue in the "Issues" tab. You may also want to reach out on Telegram.
In order to best fix a bug, it's key for other developers to be able to reproduce it. A great bug report can help that bug be reproducible! For tips on writing a good bug report, check out this stackoverflow article.
In short, please try to include the following:
- A short snippet of code that incited the bug. Formatting the code using Github Markdown would also be helpful.
- An explanation of why the behavior is incorrect and what you expected.
Found an issue you'd like to resolve? Great! If the issue has not already been claimed by another developer, write out a comment expressing your interest in claiming the issue and resolving it.
Whether you want to fix a bug, add an enhancement, or improve the documentation, you will need to know your way around Git and Github.
Pastepwn is hosted on Github, so ensure you've brushed up on the the basics. Also ensure you understand Git, which Github is built upon, by setting it up and learning the ropes.
Other requirements:
- Python ver. 3.6 or greater
- A Pastebin Premium account for testing/changing paste scrapping and scanning functionality
- Docker Desktop and Docker-compose if working via Docker and using a MySQL Database
- Familiarity with everything explained in the README and Wiki
- Download the required dependencies with the below command line in the Pastepwn root directory:
pip install -r requirements.txt
You will need to fork your own repository to be able to edit the source code. On the Pastepwn Github page, click on the Fork button. After forking and cloning your Pastepwn repository, make sure you run the following command line in the root directory of your clone:
git remote add upstream https://github.com/d-Rickyy-b/pastepwn.git
This will connect your repository to the main Pastepwn repository and will be helpful with setting up your pull request later.
Pastepwn uses flake8 to ensure properly styled "Pythonic" code that corresponds to the official PEP 8 standard. Make sure you install it via the below command line in the Pastepwn root directory:
pip install -r requirements_flake8.txt
Then, to have your code style checked, run the following command line, subbing in the name of the root directory for your local Pastepwn repository:
flake8 your_pastepwn_directory
Once you have your edited code ready to be contributed to the main Pastepwn respository, you still have a few steps to tackle!
After adding your changed files to your Git, it's time to commit your changes to your local repository with an explanatory message. The general structure of a commit message is based off of Conventional Commits and should match the following:
<type>[optional scope]: <description>
[optional body]
[optional footer]
For example, the commit message for an edit to the documentation may look something like this:
docs: correct spelling of CONTRIBUTING
For a more detailed view of this commit writing structure, please visit Conventional Commits.
Once you have pushed your the changed files to your repository on Github, it is time to make a pull request.
- Click the Pull request button on your Github repository
- Review your code by clicking Commits and Files Changed
- Write a description of your changes in the Preview Discussion tab that matches up with your commit messages
- Click Send Pull Request
This request will go to the main repository developer and will be reviewed by them. If all goes well, congrats!
Lastly, it is worth pointing out and understanding how Pastepwn handles versioning. Pastepwn follows the Semantic Versioning standard for how release versions are handled, which also requires a Changelog noting all changes made with each new version release. For a better understand it, please visit the Semantic Versioning site.