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

Is there a way to install all these custom actions without going through the manual clicks on SourceTree? #1

Open
digiajay opened this issue Aug 19, 2024 · 4 comments

Comments

@digiajay
Copy link

Hi

I'm looking for adding the custom actions that can be installed in multiple machines. I don't want each user to go through the steps of going to Options menu and adding each custom actions, is there a way to write bash script for this purpose?

OS: Windows 10

Regards,

@oe
Copy link
Owner

oe commented Aug 19, 2024

Good idea! Let me see if there is a feasible method.

@oe
Copy link
Owner

oe commented Aug 19, 2024

In MacOS, the configuration of actions is located in ~/Library/Application Support/SourceTree/actions.plist, but it can't be changed easily with the shell.

There should be a similar file in Windows, but I don't have one at hand.
You can make a PR if possible.

@digiajay
Copy link
Author

Found a C:\Users\[User Folder]\AppData\Local\Atlassian\SourceTree\customactions.xml that actually has all custom actions in the format below.

<?xml version="1.0" encoding="utf-8"?>
<ArrayOfCustomAction xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <CustomAction>
    <Caption>Prune Tags</Caption>
    <Target>C:\Users\[User Folder]\Downloads\git prune.bat</Target>
    <OpenInSeparateWindow>false</OpenInSeparateWindow>
    <ShowFullOutput>true</ShowFullOutput>
    <IsSilent>false</IsSilent>
  </CustomAction>
  <CustomAction>
    <Caption>Git Tag - Fix</Caption>
    <Target>\\EI-Data1\Users3\[User Folder]\My Documents\git tag fix.bat</Target>
    <Parameters>$SHA</Parameters>
    <OpenInSeparateWindow>true</OpenInSeparateWindow>
    <ShowFullOutput>true</ShowFullOutput>
    <IsSilent>false</IsSilent>
  </CustomAction>
</ArrayOfCustomAction>

@oe
Copy link
Owner

oe commented Aug 23, 2024

It looks like on Windows, the configuration file can be easily modified using a scripting language( Javascript, Python, php, etc.)

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

No branches or pull requests

2 participants