Skip to content

Implement psdk-use subcommands - #28

Merged
NuriYuri merged 1 commit into
PokemonWorkshop:mainfrom
Aelysya:implement-psdk-use-subcommands
Aug 12, 2026
Merged

Implement psdk-use subcommands#28
NuriYuri merged 1 commit into
PokemonWorkshop:mainfrom
Aelysya:implement-psdk-use-subcommands

Conversation

@Aelysya

@Aelysya Aelysya commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds the subcommands of psdk-use

  • mr [ID]
  • latest
  • commit [SHA1]
  • version [VERSION]

It allows using the CLI to quickly checkout a branch/commit/version when inside a psdk project.

closes #17

Tests to perform

  • Using the command psdk-use help displays a list of available commands and their use
  • Using any of the commands outside of a psdk project results in an error message saying "Not in a project".
  • All 4 commands resolve to the correct branch/commit/version specified when the given argument is valid.
  • After a successful checkout, a message describing the current state of the repository is shown (commit ref and name)
  • All 4 commands display an error when the given argument is invalid.

@NuriYuri

NuriYuri commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Did the tests (review needs to be done). Everything works.
We can open a new issue:

When we use psdk-use latest then psdk-use studio then psdk-use latest. The command do not use the opportunity to simply rename `pokemonsdk_old` to `pokemonsdk` if that's a valid git repository pointing to the actual repo

I'll do the review when I can and then add comments if I see anything.

PS: I tried both short commit ID and long commit ID.

@NuriYuri NuriYuri left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

While reading the code I thought that my own PSDK project is not a git repository, that means my test do not cover the case when a project uses pokemonsdk as a submodule.

@NuriYuri
NuriYuri merged commit 19803ff into PokemonWorkshop:main Aug 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle psdk-use version, commit, mr, latest subcommands

2 participants