TASK: Add pull request handling guide to PendingChangesBot
Example workflow
Example pull request: https://github.com/Wikimedia-Suomi/PendingChangesBot-ng/pull/27
1.) Fetch the code
mkdir 27 cd 27 git clone https://github.com/Wikimedia-Suomi/PendingChangesBot-ng.git cd PendingChangesBot-ng
2.) Fetch the pull request
git fetch origin pull/27/head:pr-27 git checkout pr-27
3.) Create virtualenv
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
4.) Add username to app/user-config.py
echo "usernames['meta']['meta'] = 'YOUR_WIKIMEDIA_USERNAME'" > app/user-config.py echo "usernames['wikipedia']['fi'] = 'YOUR_WIKIMEDIA_USERNAME'" >> app/user-config.py
4.b) Make first login to meta.wikimedia.org and superset.toolforge.org
If you have problems with superset login and you have logged in earlier then try logging out and then login for force refreshing the login information.
- Login to https://meta.wikimedia.org
- login https://superset.toolforge.org
5.) Test code with ruff
ruff check app
6.) Run migrations, tests and app
cd app python manage.py makemigrations python manage.py migrate python manage.py test python manage.py runserver
7.) Review code
If something doesn’t work then return feedback as a comment and wait new version
8.) When there is new version then pull changes and return to #5
git fetch origin pull/27/head git merge FETCH_HEAD
9.) All OK
If everything works then select “Squash and merge” in github and write commit message. Also leave thank you message for the contributor on pull request thread.
10.) clean local tree*
cd ../../ rm -rf 27