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

Updating plugin project with the latest changes from the template #54

Closed
nemwiz opened this issue Oct 29, 2020 · 5 comments
Closed

Updating plugin project with the latest changes from the template #54

nemwiz opened this issue Oct 29, 2020 · 5 comments
Labels
question Further information is requested

Comments

@nemwiz
Copy link

nemwiz commented Oct 29, 2020

Hi JetBrains team,

Thank you for providing this awesome template, it is now way smoother to build and release a plugin for Intellij.
Maybe an obvious question but this is my first time using Github templates and I also couldn't find anything useful in Google...

How do you update a project that was created from the template with the latest changes in template? I see that you are constantly improving the template and I want my plugin project to have these changes as well, so what would be the best way to update it?

Thanks

@ciscorucinski
Copy link

While I am not an official source, in my view, once you click Use This Template, you are creating a new hard fork that is fundamentally different from this repo. Once you click that button and you compare the two repos (without any additional modifications), you will see many changes that you don't want and will ignore anyway. I consider clicking on the Fork button to be a soft fork which can be easily merged.

The best approach would be to monitor this repo, and manually edit your own repo to have the changes you want.

@hsz
Copy link
Member

hsz commented Nov 3, 2020

Hi Nemanja!

I'm happy to hear that you enjoy working with the Plugin Template!

Your question is not apparent. We use the GitHub Template feature to detach other plugins based on that template from the main repository because of few reasons, like avoiding accidental pull requests against that repository and making a thick red line between JetBrains and the final third-party product.

Unfortunately, there are some downsides here:

  • there's no link between target repository and template,
  • template-based project is handled with Template Cleanup workflow, so it's not even a fork-like repository.

Also, because we don't control the final structure of the project, and users may apply any change to it, we can't provide a nice update mechanism.

So, as Christopher said - folks using the Template Plugin should monitor the base project and apply changes on their own.
That's also the reason we provide released and bump versions in SemVer stole, pointing out patches, minor and major releases.

To get notified, you can Watch for everything that happens in the current repository or at least releases only.

@hsz hsz added the question Further information is requested label Nov 3, 2020
@hsz hsz pinned this issue Nov 4, 2020
@nemwiz nemwiz closed this as completed Dec 8, 2020
@nemwiz
Copy link
Author

nemwiz commented Dec 8, 2020

Thanks for the clarifications @hsz @ciscorucinski . Closing the issue as you answered my question.

@vjpr
Copy link

vjpr commented Jun 23, 2023

Here are some tips to viewing the files changed since you generated your plugin repo.

Because you might have changed some files yourself, you will need to go through each file diff and see which are relevant for you.

NOTE: You cannot use github's compare view because your project is generated by a GH action, and is not a fork.

Find the created date of your repo

Install the Github CLI. E.g. brew install gh

cd <your plugin repo>
gh repo view --json createdAt

View a diff of the changes to the jetbrains/intellij-platform-plugin-template repo since that date

a. IntelliJ

git clone JetBrains/intellij-platform-plugin-template
cd intellij-platform-plugin-template

NOTE: To see the diff as an editor tab make sure you have Preferences > Advanced > Search: Open Diff as Editor Tab checked.

a) "Git" tool window (Log tab with filter)

  • Open IntelliJ: idea .
  • View > Tool Windows > Git
  • Select Log Tab > Date > Select... > After: <your repo creation date from above>
    • IMPORTANT: You must paste the date in the same format that you see.
  • a. Select all the rows
    • a. You can now see all the files changed in the tree view to the right
      • Clicking on a file shows a diff underneath
    • b. You can also press cmd+d or click the button in the right-panel to show a diff as an editor tab.
      • Use keyboard shortcuts ctrl+cmd+right/left to move through files.
  • b. You can also right-click and select Compare with local to view the "Changes Between" tool window

b) "Changes Between" tool window (this is probably the best)

IntelliJ has a "Changes Between` tool window that appears where the file explorer is...

  • Git > Selected Directory > Compare with Revision > <select the revision near the date>
  • Double-click on a file to see the diff

It's unfortunate there is not an easy Compare with time range... option.

b. git cli

# If you already cloned it...
git pull

# Modify the date...
git diff $(git rev-list -n1 --before="2023-05-10" main)

React Native has a nice site for this: https://react-native-community.github.io/upgrade-helper/?from=0.71.11&to=0.72.0

@ChrisCarini
Copy link

Also, if you know what version of the template your plugin was created from, you can use a 'less-nice' diff viewer (compared to the React Native one mentioned above) on GitHub directly: github.com/JetBrains/intellij-platform-plugin-template/compare/v1.12.0...v1.14.1

Screenshot 2024-07-02 at 08 07 04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants