Use git hooks to automatically add JIRA ID at the start of each commit message.
Navigate to the root of the main project repository.
Create a copy of .git/hooks/commit-msg.sample and name it commit-msg.
| // | |
| // Jenkins Job DSL example to create build projects for Bitbucket branches | |
| // | |
| // Imports | |
| import java.text.DateFormat | |
| import java.text.SimpleDateFormat | |
| import groovy.time.TimeCategory | |
| // URL components |
| #!/bin/bash | |
| # Fix source file header by removing current header and inserting standard copyright notice | |
| # Works for all C-based files, uses // comment style, current year and specified company name | |
| # Doesn't work for empty files | |
| # Temp directory | |
| TMP_DIR=$(mktemp -dt "XXXXXXXX") | |
| # Log |
| #!/bin/bash | |
| # Fix Objective-C import statements | |
| # Replace all system framework imports of #import <Path/Path.h> type with @import Path; | |
| # Temp directory | |
| TMP_DIR=$(mktemp -dt "XXXXXXXX") | |
| # Log | |
| log () { |
| require 'formula' | |
| # Homebrew formula to install atlassian CLI tools | |
| class I4nAppsAtlassianCli < Formula | |
| version "3.9.0" | |
| def release() "1" end # custom release field | |
| def java_version() ENV["JAVA_VERSION"] || "1.6" end # java version to set JAVA_HOME | |
| homepage 'https://marketplace.atlassian.com/plugins/org.swift.atlassian.cli' | |
| url "https://marketplace.atlassian.com/download/plugins/org.swift.atlassian.cli/version/#{version.to_s.delete('.')}" |
| %define __spec_install_post %{nil} | |
| %define __os_install_post %{nil} | |
| %define debug_package %{nil} | |
| Summary: nsbogan-atlassian-cli | |
| Name: nsbogan-atlassian-cli | |
| Version: %{version} | |
| Release: %{release} | |
| License: Atlassian EULA Standard License | |
| Vendor: Bob Swift Software, LLC | |
| Packager: Maksym Grebenets <[email protected]> |
| PACKAGE = nsbogan-atlassian-cli | |
| VERSION = 3.9.0 | |
| RELEASE = 1 | |
| ARCH = noarch | |
| NSBOGAN_USERNAME = automation | |
| NSBOGAN_PASSWORD = automation | |
| JAVA_VERSION = 1.6 | |
| PACKAGE_URL = https://marketplace.atlassian.com/download/plugins/org.swift.atlassian.cli/version/$(subst .,,${VERSION}) | |
| # Source directory |
| import Foundation | |
| /// Timeout Options | |
| struct Options { | |
| let timeout: Double = 1 // timeout in seconds | |
| let message = "Timeout failed." // message to display on timeout | |
| } | |
| /// Wait for something with timeout options | |
| func wait(options: Options) { |
| import AppKit | |
| typealias BaseObjCClass = NSObject | |
| enum PureSwiftEnum { | |
| case Value, AnotherValue | |
| } | |
| protocol PureSwiftProtocol { | |
| var value: PureSwiftEnum { get } | |
| var size: CGSize { get } |