Overview Version History Q & A Rating & Review
ShipHawk Helper
A VSCode extension for the ShipHawk development team to automate Git and GitLab tasks.
Usage
Open the Command Palette (Cmd/Ctrl + Shift + P)
Type "ShipHawk" to see available commands:
ShipHawk: Make Migration
- Create a new Rails migration with Spec and Handler files
ShipHawk: Create Merge Request
- Creates an MR from the current branch to QA of the picked repository. Updates RedMine ticket.
ShipHawk: Create Merge Request to Main
- Create an MR for Picked Target (rc/staging/master) for Picked Repository. Cherry-pick changes from the target branch. Updates RedMine ticket.
Features
Make Migration
Run: ShipHawk: Make Migration
Shows input box for migration name
Runs Rails migration generator (rails generate sh_migration
)
Automatically opens created files
Created Files:
db/migrate/YYYYMMDDHHMMSS_migration_name.rb
- Standard Rails migration file
lib/migration_handlers/yearYYYY/migration_name.rb
- Migration handler for asynchronous execution
spec/lib/migration_handlers/yearYYYY/migration_name_spec.rb
- Handler spec file
GIF: Make Migration
Create Merge Request
Run: ShipHawk: Create Merge Request
Verify Branch naming
Verify the commits count
Creates MR to QA for Picked Repo for Local Branch
Uses default template to create MR
Includes commit descriptions in MR body
Uses configured label from settings for picked Project
Update Redmine Ticket: Add MR Link to "Merge Request" section
GIF: Create Merge Request
Create Merge Request to Main
Run: ShipHawk: Create Merge Request to Main
Verify Branch naming
Verify commits count
Verify Local changes
Creates MR to Picked Target for Picked Repo for Picked Branch
Cherry-picks all commits from feature branch
Uses 'cherry-pick' template to create MR
Uses configured label from settings for picked Project
Add Link to original MR
Update Redmine Ticket: Add MR Link to "Merge Request" section
GIF: Create Merge Request to Main
Configuration
Extension Settings
Add the following settings to your VSCode settings:
{
"shiphawkHelper.gitlabToken": "your-gitlab-token",
"shiphawkHelper.redmineToken": "your-redmine-token",
"shiphawkHelper.projectConfigs": {
"shiphawk-dev": {
"path": "/[PATH]/shiphawk/shiphawk-dev",
"label": "platform"
},
"dashboard-mvp": {
"path": "/[PATH]/shiphawk/dashboard-mvp",
"label": "platform"
},
"wms-rf": {
"path": "/[PATH]/shiphawk/wms/wms-rf",
"label": "wms"
}
}
}
Configuration Options
GitLab Personal Access Token (required)
Used to authenticate with GitLab API
Required for read/create merge requests
Expires after 30 days
How to obtain a token
RedMine Personal Access Token (required)
Project Config (required)
Contains "project -> path", "project-> label" strings per project
"path" -> (required) Full path to the project repository
"label" -> (optional) Team Label to be added to created MR
Obtaining GitLab Personal Access Token
Log in to your GitLab account
Click on your avatar in the top right corner
Go to Preferences > Access Tokens
Enter a name for your token (e.g., "ShipHawk Helper")
Select the following scopes:
api
- for creating merge requests
Click "Create personal access token"
Copy the generated token immediately (you won't be able to see it again)
Note : The token will expire after 30 days. You'll need to create a new one when it expires.
Obtaining RedMine Personal Access Token
Log in to your RedMine account
Click on your avatar in the top right corner
Go to My Account > API access key
Click "Show" to reveal your API key
Copy the API key immediately
Note : Keep this key secure as it provides access to your RedMine account