atlassian-stash 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +37 -12
- data/VERSION +1 -1
- data/bin/stash +12 -7
- data/lib/atlassian/stash/git.rb +4 -0
- metadata +3 -3
data/README.md
CHANGED
@@ -1,17 +1,42 @@
|
|
1
|
-
Atlassian Stash
|
2
|
-
===================
|
1
|
+
# Atlassian Stash Command Line Tools
|
3
2
|
|
3
|
+
## Installing this tool
|
4
|
+
This command line helper for Stash is written in Ruby and is deployed as a [Ruby Gem](https://rubygems.org/gems/atlassian-stash/). Installation is easy, simply run the following command
|
4
5
|
|
5
|
-
|
6
|
-
------------------
|
7
|
-
1. gem install bundler
|
8
|
-
2. bundle install
|
6
|
+
$> gem install atlassian-stash
|
9
7
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
(Protip: you might need to `sudo`)
|
9
|
+
|
10
|
+
Once the gem is installed, the command `stash` will be in your `$PATH`
|
11
|
+
|
12
|
+
## Configuration and usage
|
13
|
+
Run `stash configure`. This will prompt for details about your Stash instance.
|
14
|
+
|
15
|
+
### Creating a pull request
|
16
|
+
Use the `pull-request` command to create a pull request in Stash. E.g:
|
17
|
+
|
18
|
+
$> stash pull-request topicBranch master @michael
|
19
|
+
Create a pull request from branch 'topicBranch' into 'master' with 'michael' added as a reviewer
|
20
|
+
|
21
|
+
See the usage for command details
|
15
22
|
|
16
|
-
See the usage help for more information by running
|
17
23
|
stash help
|
24
|
+
|
25
|
+
## Troubleshooting
|
26
|
+
Q: I installed the gem, but the `stash` command doesn't work.
|
27
|
+
A: Do you have another command called `stash` or do you have an alias? Have a look where the command maps to
|
28
|
+
|
29
|
+
$> which -a stash
|
30
|
+
|
31
|
+
Then check the value of your $PATH
|
32
|
+
|
33
|
+
## I want to contribute
|
34
|
+
Thanks! Please [fork this project](https://bitbucket.org/atlassian/atlassian-stash-rubygem/fork) and create a pull request to submit changes back to the original project.
|
35
|
+
|
36
|
+
### Build instructions
|
37
|
+
Building this gem is easy. To get started, run the following commands:
|
38
|
+
|
39
|
+
$> gem install bundler
|
40
|
+
$> bundler install
|
41
|
+
|
42
|
+
Now start hacking, and run the stash command by invoking `./bin/stash command`
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/stash
CHANGED
@@ -22,10 +22,8 @@ def load_config
|
|
22
22
|
config
|
23
23
|
end
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
command 'setup' do |c|
|
28
|
-
c.syntax = 'setup'
|
25
|
+
command 'configure' do |c|
|
26
|
+
c.syntax = 'configure'
|
29
27
|
c.description = 'Setup configuration details to your Stash instance'
|
30
28
|
c.example 'stash setup --username sebr --password s3cre7 --stash_url http://stash.mycompany.com', 'Setup Stash CLI with credentials to the Stash server'
|
31
29
|
c.option '--username user', String, 'Writes your Stash username to the configuration file'
|
@@ -47,6 +45,8 @@ command 'setup' do |c|
|
|
47
45
|
end
|
48
46
|
|
49
47
|
File.chmod 0600, $configFile
|
48
|
+
|
49
|
+
create_git_alias if agree "Create a git alias 'git create-pull-request'? "
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
@@ -57,12 +57,13 @@ command 'pull-request' do |c|
|
|
57
57
|
}.compact
|
58
58
|
end
|
59
59
|
|
60
|
-
c.syntax = 'pull-request
|
60
|
+
c.syntax = 'pull-request [sourceBranch] targetBranch [@reviewer1 @reviewer2]'
|
61
61
|
c.description = 'Create a pull request in Stash'
|
62
|
-
c.example 'stash pull-request topicBranch master', "
|
62
|
+
c.example 'stash pull-request topicBranch master @michael', "Create a pull request from branch 'topicBranch' into 'master' with 'michael' added as a reviewer"
|
63
|
+
c.example 'stash pull-request master', "Create a pull request from the current git branch into 'master'"
|
63
64
|
c.action do |args, options|
|
64
65
|
if args.length == 0
|
65
|
-
command(:help).run(
|
66
|
+
command(:help).run('pull-request')
|
66
67
|
Process.exit
|
67
68
|
end
|
68
69
|
|
@@ -84,5 +85,9 @@ command 'pull-request' do |c|
|
|
84
85
|
end
|
85
86
|
|
86
87
|
default_command :help
|
88
|
+
program :help_formatter, :compact
|
89
|
+
program :help, 'Authors', 'Seb Ruiz <sruiz@atlassian.com> with others'
|
90
|
+
program :help, 'Website', 'https://bitbucket.org/atlassian/atlassian-stash-rubygem'
|
91
|
+
|
87
92
|
|
88
93
|
# vim set ft=ruby
|
data/lib/atlassian/stash/git.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Seb Ruiz
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-10-
|
17
|
+
date: 2012-10-27 00:00:00 +11:00
|
18
18
|
default_executable: stash
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|