Understanding Tower Git Client Custom Actions: A Practical Guide
Tower's Custom Actions let you run scripts on selected files in the GUI. This guide shows how to configure and use this feature, with notes on limitations and verification.
26 Jul 2026, 10:40 UTC

What Tower Custom Actions Can Do
Tower's Custom Actions feature allows you to integrate external scripts into the Git workflow within the Tower GUI. When configured correctly, these actions can run validation scripts, formatters, or other tools on the files you've selected before committing. This integration provides a way to add project-specific checks without leaving the Tower interface.
How Custom Actions Pass Arguments
When you select files in Tower's file view and choose a Custom Action, Tower passes the absolute or relative paths of those selected files as command-line arguments to your script. The script receives these paths as $1, $2, and so on in a bash environment. This mechanism allows you to target specific files for operations like linting or formatting.
Example: Creating a File Validation Script
Create a shell script in your repository (e.g., validate-files.sh):
#!/bin/bash
# validate-files.sh: Check if selected files meet project criteria
# Tower passes selected file paths as arguments
for file in "$@"; do
# Check if file is a JavaScript file
if [[ "$file" == *.js ]]; then
# Run a simple check - file should not be empty
if [ ! -s "$file" ]; then
echo "Error: Empty JavaScript file: $file"
exit 1
fi
fi
done
echo "All selected files passed validation"
exit 0
Make the script executable:
chmod +x validate-files.sh
Configuring in Tower
- Open Tower and navigate to Repository → Settings → Custom Actions
- Click + Add Action
- Enter a Label such as "Validate Files"
- For Script, enter the path to your script (e.g.,
validate-files.sh) - Leave Arguments empty - Tower will append selected files automatically
- Check Run in Terminal to see output in the log pane
- Click Save
Note: Tower versions may vary in their exact menu structure. The Custom Actions feature has been available in recent versions of Tower, but the exact location of settings may differ between releases.
Important Limitations
Commit Blocking Behavior
While Custom Actions can execute scripts that return non-zero exit codes, the behavior of Tower in response to these exit codes varies by version. Some configurations may allow commits to proceed regardless of script exit status. You should test the specific behavior in your Tower version to understand how it handles script failures.
Scope Limitation
Custom Actions only execute when you explicitly invoke them from Tower's interface. They do not run automatically during the commit process unless you configure additional hooks or workflows. If you commit through the command line or other Git clients, Custom Actions will not execute.
Environment Considerations
Scripts run with Tower's environment, which may not include all shell configurations. You may need to use full paths to executables or source your shell profile within the script to ensure all dependencies are available.
Verification Approach
To verify your Custom Action works:
- Open Tower's Log pane (View → Log or similar menu option)
- Select one or more files in the file view
- Choose your Custom Action from the Custom Actions menu
- Observe the output in the log pane
- Check whether the action completes successfully or reports errors
Practical Recommendation
For teams using Tower, consider Custom Actions as one tool in a broader workflow strategy. You might combine Tower's Custom Actions with Git hooks for command-line work, ensuring consistent validation across different work environments. Always document your Custom Actions for team members and test them regularly, especially after Tower updates, as the feature's behavior may change between versions.
Important Notes
- The exact behavior of Custom Actions, including any automatic commit blocking, should be verified in your specific version of Tower
- Different versions of Tower may have different capabilities or behaviors for Custom Actions
- Security considerations apply when running scripts from GUI applications - only use trusted scripts
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.