Page MenuHomePhabricator

mwbot-rs: Support prop=images in mwapi_responses
Open, MediumPublic

Description

Originally filed on GitLab.com

Used by https://github.com/Krinkle/pywiki-fileprotectionsync/blob/master/fileprotectionsync.py#L52

mwapi_responses uses JSON files to represent structs that the API responds with, see https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot/-/tree/main/mwapi_responses_derive/data. You'll need to create a new one for prop=images, which is documented at https://www.mediawiki.org/wiki/API:Images. Then you can automatically generate test cases (see https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot/-/blob/main/mwapi_responses/gen_tests.py) and verify they pass.


Also take a look at mwbot-rs's contributing instructions.

Event Timeline

Legoktm triaged this task as Medium priority.

Hi @Aklapper @Legoktm , I created a merged request for this , could you please review it .
https://gitlab.com/mwbot-rs/mwbot/-/merge_requests/50
I am a newbie in open source , any guidance would be appreciated.

I cannot because I am not involved in mwbot-rs development. I am just subscribed to this task. :)

@Priyanshu_Chahal Thanks for your contribution to the mwbot-rs project! Please submit your MR to https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot , where most development of mwbot-rs happens. The old mirror on gitlab.com is outdated.

@XtexChooser could help me with the developer access at gitlab , so that i can fork the repo , i read about it here , i am new to gitlab , any help would be helpful .
Regards

@Priyanshu_Chahal Please see the banners on gitlab.wikimedia.org. Please also see https://www.mediawiki.org/wiki/New_Developers#Communication_tips and ask a more specific question - thanks! :)

When I tried to fork the repository, I received a message saying I need developer access. I attempted to sign in using the username I use for Phabricator, but I was denied access. Upon reviewing the contribution guidelines, I found the following instructions:

“To get started, reach out to one of the project leads to gain developer access to the repository, so you can push your work. If you’re not already well-known within the wiki communities, you might be asked to submit a few pull requests before being granted access.”

What should I do next? I also tried cloning the repository, but I received a “Permission Denied” error.

saying I need developer access. I attempted to sign in

Where? Please provide full URLs.

Upon reviewing the contribution guidelines

Where? Please provide full URLs.

Not sure I can follow but I'd love to understand where folks get stuck with our systems. "Sign in" on https://gitlab.wikimedia.org/ goes to https://idp.wikimedia.org/login . That page says "Need to create a Wikimedia developer account?" linking to https://idm.wikimedia.org/signup/ . At which step did you run into problems?

What should I do next? I also tried cloning the repository, but I received a “Permission Denied” error.

"tried cloning" how exactly? Some GitLab web interface or local command line, after performing which steps/commands?
Have you set up your SSH key in your GitLab settings already?

Screenshot 2025-01-03 at 7.32.24 PM.png (534×1 px, 154 KB)
i reach till this step , everytime i attempt to login and then nothing,
Screenshot 2025-01-03 at 7.33.52 PM.png (736×1 px, 176 KB)
this is the page where i read about contribution , the link for this is : https://www.mediawiki.org/wiki/Mwbot-rs
i tried cloning using local command line using the following commands :

 % git clone git@gitlab.wikimedia.org:repos/mwbot-rs/mwbot.git
Cloning into 'mwbot'...
git@gitlab.wikimedia.org: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
 % ssh -T git@gitlab.wikimedia.org
git@gitlab.wikimedia.org: Permission denied (publickey).
 % ssh -T git@gitlab.com
Enter passphrase for key '/Users/priyanshuchahal/.ssh/id_ed25519': 
Welcome to GitLab, @priyanshuchahal1!
``` also my ssh keys are already setup

Your GitLab screenshot says "Your account is pending approval".

yeah , i have been waiting for it since like last 2 weeks

You should fork the repository and then clone your fork. You may be added a a member of the mwbot-rs org so you can directly clone and push to the mwbot-rs/mwbot repository.

For your GitLab account, according to the GitLab banner, you may need to fill out [ https://phabricator.wikimedia.org/maniphest/task/edit/form/117/ | this form ] on Phabricator to activate your account.