How can I contribute to Pokémon SDK?

Fork PSDK

  • Go to the PSDK Repo
  • Click on the fork button
  • In your fork
    • Click on the Settings -> Repository button
    • Go to the Mirroring repositories section
    • Put this URL in the Git Repository URL : https://gitlab.com/pokemonsdk/pokemonsdk.git
    • Set Mirror Direction to Pull
    • Check Only mirror protected branches

Set your local repository

In your Pokémon SDK folder, you'll open cmd.bat and write the following commands :

  • cd pokemonsdk
  • git remote set-url origin yoursshurl
    • You can get the url by clicking on clone in your PSDK Fork details. Take the SSH URL otherwise it'll be hard to push.
  • git pull

When Making a new feature or a bugfix

You should follow the branch naming:

  • Feature branche are named like this : feature/us-ID-name
  • The bug fix branche are named like this : bugfix/us-ID-name

To make your new feature/bugfix enter the following commands your pokemonsdk folder:

  • git checkout development
  • git pull
  • git checkout -b name_of_the_branch

You'll be now able to work on what you need to work.

Note : You should never commit inside development. If you do so you'll break your fork (mirroring will never work again).

When commiting to your branch

If your branch aim to fix a bug, make sure the last commit contains the following in the commit message : fix #idofthe_issue

When you'll merge with the official development branch it'll close the issue.

Before merging to development

First thing to know. You should not merge your change to the development branch. You have to make a merge request from your feature/bugfix branch to the official (pokemonsdk/pokemonsdk) development branch.

Second thing : You have to test your feature or your bugfix.

  • The PSDK project should be able to boot
  • All the PSDK feature should work like they worked before (except the one you fixed obviously)
  • Your feature/bugfix should not introduce a new bug (we won't get mad if you didn't see any new bugs)

Third thing : You have to be up to date

  • You should merged the development branch in your feature/bugfix branch in order to be upto date
  • You should solve all the conflict

When making the Merge Request

  • In Source branch
    • Select your project
    • Select the branch you want to merge with PSDK development
  • In Target branch
    • Select the project NuriYuri/pokemonsdk
    • Select the branch development
  • Click on the Compare branches and continue button

You'll see the New Merge Request UI

  • In Title put a title that is a bit more explicit than the branch name
  • In description
    • describe the goal of the merge
    • add reference to issues if needed
    • tell us if you added files that aren't supposed to be in the pokemonsdk folder (graphics for example)
      • You can put a link to a 7z archive that adds all the new ressources by simply extracting it in the project root
  • Assign the Merge to NuriYuri if it's possible
  • Add labels that can make the merge more obvious about the field of application
  • Check Delete source branch when merge request is accepted.
  • Check Squash commits when merge request is accepted.
  • Click on Submit merge request button

If your merge request didn't get any comment or didn't get merged after one week contact a PSDK maintainer through the Pokémon Workshop Discord (you'll find a link int the website). We have a webhook that tells all the action on the main Gitlab repo so NuriYuri should see the request but no-one is perfect and NuriYuri can forget about it...

Coding rule

You can find more informations about the coding rule on the GitLab repository.