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.

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
GIF: Create Merge Request

Configuration
Extension Settings
Add the following settings to your VSCode settings:
{
"shiphawkHelper.gitlabToken": "your-gitlab-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"
},
"workstation-ui": {
"path": "/[PATH]/shiphawk/workstation-ui",
"label": "platform"
},
}
}
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
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.
| |