├── README.md
├── commit-message.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcuserdata
│ └── brianmario.xcuserdatad
│ └── xcschemes
│ ├── commit-message.xcscheme
│ └── xcschememanagement.plist
├── commit-message
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
├── Base.lproj
│ └── Main.storyboard
├── Info.plist
├── ViewController.swift
└── commit_message.entitlements
└── message-template.txt
/README.md:
--------------------------------------------------------------------------------
1 | # Commit Message Editor
2 |
3 | This is a tiny, fast commit message editor.
4 |
5 | It has a subject line and a body field. Ideally it will eventually support
6 | GitHub-flavored markdown syntax (with autocompleters). But, you gotta start
7 | somewhere.
8 |
9 | It looks like this:
10 |
11 |
12 |
13 | ## Usage
14 |
15 | `git config --global core.editor commit-message`
16 |
17 | Then every time you commit, leave off `-m` and let this modal help you fill out
18 | your commit message.
19 |
--------------------------------------------------------------------------------
/commit-message.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 8A6FD28721881E1B005ACCA6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A6FD28621881E1B005ACCA6 /* AppDelegate.swift */; };
11 | 8A6FD28921881E1B005ACCA6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A6FD28821881E1B005ACCA6 /* ViewController.swift */; };
12 | 8A6FD28B21881E1D005ACCA6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8A6FD28A21881E1D005ACCA6 /* Assets.xcassets */; };
13 | 8A6FD28E21881E1D005ACCA6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8A6FD28C21881E1D005ACCA6 /* Main.storyboard */; };
14 | 8AC8DBDA2189051B005ACCA6 /* message-template.txt in Resources */ = {isa = PBXBuildFile; fileRef = 8AC8DBD92189051A005ACCA6 /* message-template.txt */; };
15 | /* End PBXBuildFile section */
16 |
17 | /* Begin PBXFileReference section */
18 | 8A6FD28321881E1B005ACCA6 /* commit-message.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "commit-message.app"; sourceTree = BUILT_PRODUCTS_DIR; };
19 | 8A6FD28621881E1B005ACCA6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
20 | 8A6FD28821881E1B005ACCA6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
21 | 8A6FD28A21881E1D005ACCA6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
22 | 8A6FD28D21881E1D005ACCA6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
23 | 8A6FD28F21881E1D005ACCA6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
24 | 8A6FD29021881E1D005ACCA6 /* commit_message.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = commit_message.entitlements; sourceTree = ""; };
25 | 8AC8DBD92189051A005ACCA6 /* message-template.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "message-template.txt"; sourceTree = ""; };
26 | /* End PBXFileReference section */
27 |
28 | /* Begin PBXFrameworksBuildPhase section */
29 | 8A6FD28021881E1B005ACCA6 /* Frameworks */ = {
30 | isa = PBXFrameworksBuildPhase;
31 | buildActionMask = 2147483647;
32 | files = (
33 | );
34 | runOnlyForDeploymentPostprocessing = 0;
35 | };
36 | /* End PBXFrameworksBuildPhase section */
37 |
38 | /* Begin PBXGroup section */
39 | 8A6FD27A21881E1B005ACCA6 = {
40 | isa = PBXGroup;
41 | children = (
42 | 8AC8DBD92189051A005ACCA6 /* message-template.txt */,
43 | 8A6FD28521881E1B005ACCA6 /* commit-message */,
44 | 8A6FD28421881E1B005ACCA6 /* Products */,
45 | );
46 | sourceTree = "";
47 | };
48 | 8A6FD28421881E1B005ACCA6 /* Products */ = {
49 | isa = PBXGroup;
50 | children = (
51 | 8A6FD28321881E1B005ACCA6 /* commit-message.app */,
52 | );
53 | name = Products;
54 | sourceTree = "";
55 | };
56 | 8A6FD28521881E1B005ACCA6 /* commit-message */ = {
57 | isa = PBXGroup;
58 | children = (
59 | 8A6FD28621881E1B005ACCA6 /* AppDelegate.swift */,
60 | 8A6FD28821881E1B005ACCA6 /* ViewController.swift */,
61 | 8A6FD28A21881E1D005ACCA6 /* Assets.xcassets */,
62 | 8A6FD28C21881E1D005ACCA6 /* Main.storyboard */,
63 | 8A6FD28F21881E1D005ACCA6 /* Info.plist */,
64 | 8A6FD29021881E1D005ACCA6 /* commit_message.entitlements */,
65 | );
66 | path = "commit-message";
67 | sourceTree = "";
68 | };
69 | /* End PBXGroup section */
70 |
71 | /* Begin PBXNativeTarget section */
72 | 8A6FD28221881E1B005ACCA6 /* commit-message */ = {
73 | isa = PBXNativeTarget;
74 | buildConfigurationList = 8A6FD29321881E1D005ACCA6 /* Build configuration list for PBXNativeTarget "commit-message" */;
75 | buildPhases = (
76 | 8A6FD27F21881E1B005ACCA6 /* Sources */,
77 | 8A6FD28021881E1B005ACCA6 /* Frameworks */,
78 | 8A6FD28121881E1B005ACCA6 /* Resources */,
79 | );
80 | buildRules = (
81 | );
82 | dependencies = (
83 | );
84 | name = "commit-message";
85 | productName = "commit-message";
86 | productReference = 8A6FD28321881E1B005ACCA6 /* commit-message.app */;
87 | productType = "com.apple.product-type.application";
88 | };
89 | /* End PBXNativeTarget section */
90 |
91 | /* Begin PBXProject section */
92 | 8A6FD27B21881E1B005ACCA6 /* Project object */ = {
93 | isa = PBXProject;
94 | attributes = {
95 | LastSwiftUpdateCheck = 1000;
96 | LastUpgradeCheck = 1000;
97 | ORGANIZATIONNAME = "Brian Lopez";
98 | TargetAttributes = {
99 | 8A6FD28221881E1B005ACCA6 = {
100 | CreatedOnToolsVersion = 10.0;
101 | SystemCapabilities = {
102 | com.apple.Sandbox = {
103 | enabled = 0;
104 | };
105 | };
106 | };
107 | };
108 | };
109 | buildConfigurationList = 8A6FD27E21881E1B005ACCA6 /* Build configuration list for PBXProject "commit-message" */;
110 | compatibilityVersion = "Xcode 9.3";
111 | developmentRegion = en;
112 | hasScannedForEncodings = 0;
113 | knownRegions = (
114 | en,
115 | Base,
116 | );
117 | mainGroup = 8A6FD27A21881E1B005ACCA6;
118 | productRefGroup = 8A6FD28421881E1B005ACCA6 /* Products */;
119 | projectDirPath = "";
120 | projectRoot = "";
121 | targets = (
122 | 8A6FD28221881E1B005ACCA6 /* commit-message */,
123 | );
124 | };
125 | /* End PBXProject section */
126 |
127 | /* Begin PBXResourcesBuildPhase section */
128 | 8A6FD28121881E1B005ACCA6 /* Resources */ = {
129 | isa = PBXResourcesBuildPhase;
130 | buildActionMask = 2147483647;
131 | files = (
132 | 8AC8DBDA2189051B005ACCA6 /* message-template.txt in Resources */,
133 | 8A6FD28B21881E1D005ACCA6 /* Assets.xcassets in Resources */,
134 | 8A6FD28E21881E1D005ACCA6 /* Main.storyboard in Resources */,
135 | );
136 | runOnlyForDeploymentPostprocessing = 0;
137 | };
138 | /* End PBXResourcesBuildPhase section */
139 |
140 | /* Begin PBXSourcesBuildPhase section */
141 | 8A6FD27F21881E1B005ACCA6 /* Sources */ = {
142 | isa = PBXSourcesBuildPhase;
143 | buildActionMask = 2147483647;
144 | files = (
145 | 8A6FD28921881E1B005ACCA6 /* ViewController.swift in Sources */,
146 | 8A6FD28721881E1B005ACCA6 /* AppDelegate.swift in Sources */,
147 | );
148 | runOnlyForDeploymentPostprocessing = 0;
149 | };
150 | /* End PBXSourcesBuildPhase section */
151 |
152 | /* Begin PBXVariantGroup section */
153 | 8A6FD28C21881E1D005ACCA6 /* Main.storyboard */ = {
154 | isa = PBXVariantGroup;
155 | children = (
156 | 8A6FD28D21881E1D005ACCA6 /* Base */,
157 | );
158 | name = Main.storyboard;
159 | sourceTree = "";
160 | };
161 | /* End PBXVariantGroup section */
162 |
163 | /* Begin XCBuildConfiguration section */
164 | 8A6FD29121881E1D005ACCA6 /* Debug */ = {
165 | isa = XCBuildConfiguration;
166 | buildSettings = {
167 | ALWAYS_SEARCH_USER_PATHS = NO;
168 | CLANG_ANALYZER_NONNULL = YES;
169 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
170 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
171 | CLANG_CXX_LIBRARY = "libc++";
172 | CLANG_ENABLE_MODULES = YES;
173 | CLANG_ENABLE_OBJC_ARC = YES;
174 | CLANG_ENABLE_OBJC_WEAK = YES;
175 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
176 | CLANG_WARN_BOOL_CONVERSION = YES;
177 | CLANG_WARN_COMMA = YES;
178 | CLANG_WARN_CONSTANT_CONVERSION = YES;
179 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
180 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
181 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
182 | CLANG_WARN_EMPTY_BODY = YES;
183 | CLANG_WARN_ENUM_CONVERSION = YES;
184 | CLANG_WARN_INFINITE_RECURSION = YES;
185 | CLANG_WARN_INT_CONVERSION = YES;
186 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
187 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
188 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
189 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
190 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
191 | CLANG_WARN_STRICT_PROTOTYPES = YES;
192 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
193 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
194 | CLANG_WARN_UNREACHABLE_CODE = YES;
195 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
196 | CODE_SIGN_IDENTITY = "-";
197 | COPY_PHASE_STRIP = NO;
198 | DEBUG_INFORMATION_FORMAT = dwarf;
199 | ENABLE_STRICT_OBJC_MSGSEND = YES;
200 | ENABLE_TESTABILITY = YES;
201 | GCC_C_LANGUAGE_STANDARD = gnu11;
202 | GCC_DYNAMIC_NO_PIC = NO;
203 | GCC_NO_COMMON_BLOCKS = YES;
204 | GCC_OPTIMIZATION_LEVEL = 0;
205 | GCC_PREPROCESSOR_DEFINITIONS = (
206 | "DEBUG=1",
207 | "$(inherited)",
208 | );
209 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
210 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
211 | GCC_WARN_UNDECLARED_SELECTOR = YES;
212 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
213 | GCC_WARN_UNUSED_FUNCTION = YES;
214 | GCC_WARN_UNUSED_VARIABLE = YES;
215 | MACOSX_DEPLOYMENT_TARGET = 10.14;
216 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
217 | MTL_FAST_MATH = YES;
218 | ONLY_ACTIVE_ARCH = YES;
219 | SDKROOT = macosx;
220 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
221 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
222 | };
223 | name = Debug;
224 | };
225 | 8A6FD29221881E1D005ACCA6 /* Release */ = {
226 | isa = XCBuildConfiguration;
227 | buildSettings = {
228 | ALWAYS_SEARCH_USER_PATHS = NO;
229 | CLANG_ANALYZER_NONNULL = YES;
230 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
231 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
232 | CLANG_CXX_LIBRARY = "libc++";
233 | CLANG_ENABLE_MODULES = YES;
234 | CLANG_ENABLE_OBJC_ARC = YES;
235 | CLANG_ENABLE_OBJC_WEAK = YES;
236 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
237 | CLANG_WARN_BOOL_CONVERSION = YES;
238 | CLANG_WARN_COMMA = YES;
239 | CLANG_WARN_CONSTANT_CONVERSION = YES;
240 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
241 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
242 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
243 | CLANG_WARN_EMPTY_BODY = YES;
244 | CLANG_WARN_ENUM_CONVERSION = YES;
245 | CLANG_WARN_INFINITE_RECURSION = YES;
246 | CLANG_WARN_INT_CONVERSION = YES;
247 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
248 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
249 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
250 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
251 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
252 | CLANG_WARN_STRICT_PROTOTYPES = YES;
253 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
254 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
255 | CLANG_WARN_UNREACHABLE_CODE = YES;
256 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
257 | CODE_SIGN_IDENTITY = "-";
258 | COPY_PHASE_STRIP = NO;
259 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
260 | ENABLE_NS_ASSERTIONS = NO;
261 | ENABLE_STRICT_OBJC_MSGSEND = YES;
262 | GCC_C_LANGUAGE_STANDARD = gnu11;
263 | GCC_NO_COMMON_BLOCKS = YES;
264 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
265 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
266 | GCC_WARN_UNDECLARED_SELECTOR = YES;
267 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
268 | GCC_WARN_UNUSED_FUNCTION = YES;
269 | GCC_WARN_UNUSED_VARIABLE = YES;
270 | MACOSX_DEPLOYMENT_TARGET = 10.14;
271 | MTL_ENABLE_DEBUG_INFO = NO;
272 | MTL_FAST_MATH = YES;
273 | SDKROOT = macosx;
274 | SWIFT_COMPILATION_MODE = wholemodule;
275 | SWIFT_OPTIMIZATION_LEVEL = "-O";
276 | };
277 | name = Release;
278 | };
279 | 8A6FD29421881E1D005ACCA6 /* Debug */ = {
280 | isa = XCBuildConfiguration;
281 | buildSettings = {
282 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
283 | CODE_SIGN_STYLE = Automatic;
284 | COMBINE_HIDPI_IMAGES = YES;
285 | INFOPLIST_FILE = "commit-message/Info.plist";
286 | LD_RUNPATH_SEARCH_PATHS = (
287 | "$(inherited)",
288 | "@executable_path/../Frameworks",
289 | );
290 | PRODUCT_BUNDLE_IDENTIFIER = "sharperCoding.commit-message";
291 | PRODUCT_NAME = "$(TARGET_NAME)";
292 | SWIFT_VERSION = 4.2;
293 | };
294 | name = Debug;
295 | };
296 | 8A6FD29521881E1D005ACCA6 /* Release */ = {
297 | isa = XCBuildConfiguration;
298 | buildSettings = {
299 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
300 | CODE_SIGN_STYLE = Automatic;
301 | COMBINE_HIDPI_IMAGES = YES;
302 | INFOPLIST_FILE = "commit-message/Info.plist";
303 | LD_RUNPATH_SEARCH_PATHS = (
304 | "$(inherited)",
305 | "@executable_path/../Frameworks",
306 | );
307 | PRODUCT_BUNDLE_IDENTIFIER = "sharperCoding.commit-message";
308 | PRODUCT_NAME = "$(TARGET_NAME)";
309 | SWIFT_VERSION = 4.2;
310 | };
311 | name = Release;
312 | };
313 | /* End XCBuildConfiguration section */
314 |
315 | /* Begin XCConfigurationList section */
316 | 8A6FD27E21881E1B005ACCA6 /* Build configuration list for PBXProject "commit-message" */ = {
317 | isa = XCConfigurationList;
318 | buildConfigurations = (
319 | 8A6FD29121881E1D005ACCA6 /* Debug */,
320 | 8A6FD29221881E1D005ACCA6 /* Release */,
321 | );
322 | defaultConfigurationIsVisible = 0;
323 | defaultConfigurationName = Release;
324 | };
325 | 8A6FD29321881E1D005ACCA6 /* Build configuration list for PBXNativeTarget "commit-message" */ = {
326 | isa = XCConfigurationList;
327 | buildConfigurations = (
328 | 8A6FD29421881E1D005ACCA6 /* Debug */,
329 | 8A6FD29521881E1D005ACCA6 /* Release */,
330 | );
331 | defaultConfigurationIsVisible = 0;
332 | defaultConfigurationName = Release;
333 | };
334 | /* End XCConfigurationList section */
335 | };
336 | rootObject = 8A6FD27B21881E1B005ACCA6 /* Project object */;
337 | }
338 |
--------------------------------------------------------------------------------
/commit-message.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/commit-message.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/commit-message.xcodeproj/xcuserdata/brianmario.xcuserdatad/xcschemes/commit-message.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
81 |
87 |
88 |
89 |
90 |
92 |
93 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/commit-message.xcodeproj/xcuserdata/brianmario.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | commit-message.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 8A6FD28221881E1B005ACCA6
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/commit-message/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // commit-message
4 | //
5 | // Created by Brian Lopez on 10/29/18.
6 | // Copyright © 2018 Brian Lopez. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | @NSApplicationMain
12 | class AppDelegate: NSObject, NSApplicationDelegate {
13 |
14 | func applicationDidFinishLaunching(_ aNotification: Notification) {
15 |
16 | }
17 |
18 | func applicationWillTerminate(_ aNotification: Notification) {
19 |
20 | }
21 |
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/commit-message/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/commit-message/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/commit-message/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/commit-message/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleVersion
22 | 1
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | Copyright © 2018 Brian Lopez. All rights reserved.
27 | NSMainStoryboardFile
28 | Main
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/commit-message/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // commit-message
4 | //
5 | // Created by Brian Lopez on 10/29/18.
6 | // Copyright © 2018 Brian Lopez. All rights reserved.
7 | //
8 |
9 | import Cocoa
10 |
11 | class ViewController: NSViewController {
12 | @IBOutlet weak var subjectField: NSTextField!
13 | @IBOutlet weak var bodyField: NSTextField!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | if (CommandLine.arguments.count > 1) {
19 | // We'll just assume CommandLine.arguments[1] is the commit message file we need to edit.
20 |
21 | var commitMessageTemplate: [String] = [""]
22 |
23 | do {
24 | commitMessageTemplate = try String(contentsOfFile: CommandLine.arguments[1]).components(separatedBy: NSCharacterSet.newlines)
25 | } catch {
26 | print("Error loading file: \(error).")
27 | }
28 |
29 | subjectField.stringValue = commitMessageTemplate[0]
30 |
31 | bodyField.stringValue = commitMessageTemplate[1...].joined(separator: "\n").trimmingCharacters(in: NSCharacterSet.newlines)
32 | }
33 | }
34 |
35 | override var representedObject: Any? {
36 | didSet {
37 | // Update the view, if already loaded.
38 | }
39 | }
40 |
41 |
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/commit-message/commit_message.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/message-template.txt:
--------------------------------------------------------------------------------
1 | This should be the subject line
2 |
3 | All of this should be the body.
4 |
5 | Including this. And some emoji 🍷.
6 |
--------------------------------------------------------------------------------