Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to select changes for new version #15

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nerdcel
Copy link

@nerdcel nerdcel commented Aug 21, 2023

Describe the PR

Instead of automatically add (stage) all changes to be in a new created version, the user can now select which changes should be versioned. #4

  • Added unit tests for fixed bug/feature
  • Added in-code documentation (if needed)
  • CI passes (runs automatically when the PR is created or run composer ci locally)
    Running locally requires PHPUnit, PHP-CS-Fixer, Psalm, PHPCPD and PHPMD.

- add new component to view selected stages for version creation
- add new api route
- change changes dialog to have checkboxes
- add additional vuex store object for stage list
@lukasbestle
Copy link
Owner

lukasbestle commented Sep 6, 2023

Thank you for your PR and sorry for the delay. There is a lot going on at the moment, so it will unfortunately still take a while until I can review it.

@lukasbestle
Copy link
Owner

This looks promising and I agree that staging individual files is a useful feature. I'd implement a few things differently and wanted to get v4 support out of the door first.

Copy link
Owner

@lukasbestle lukasbestle left a comment

Choose a reason for hiding this comment

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

Now I had the chance to look at this in more detail. Thanks for your work. 💛

Unfortunately I cannot merge this as is, mainly for two conceptual reasons:

  • The current setup relies on the prepareVersionCreation step as Git only fully populates the list of changes once they are in the index. E.g. renamed files are only detected as such once both the "added" and "removed" files are in the index. So basing the UI on the state before adding anything to the index won't match the expected UX of common Git clients. They also start with the simple view of changes, but e.g. once you add a directory to the index, the view updates. That is currently not possible without a live-updating list of changes. But I'm not sure if such a live-updating list is worth it complexity-wise.
  • The backend needs to validate the list of files to stage. Otherwise one could easily execute different commands via argument injection.

At the moment I don't have the resources to work on the feature further and to be honest I also cannot guarantee that I can review external code for this plugin as I wrote in the contributing guide.

@lukasbestle lukasbestle added the type: feature ⭐️ Adds or requests a feature label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature ⭐️ Adds or requests a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants