Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
83106427
Commit
83106427
authored
Mar 27, 2018
by
Tiago Botelho
Committed by
Rémy Coutable
Jan 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Opens specified text editor when creating a new changelog entry
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
82852058
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
bin/changelog
bin/changelog
+9
-1
No files found.
bin/changelog
View file @
83106427
...
...
@@ -148,7 +148,7 @@ class ChangelogEntry
def
execute
assert_feature_branch!
assert_title!
assert_title!
unless
editor
assert_new_file!
# Read type from $stdin unless is already set
...
...
@@ -162,6 +162,10 @@ class ChangelogEntry
write
amend_commit
if
options
.
amend
end
if
editor
system
(
"
#{
editor
}
'
#{
file_path
}
'"
)
end
end
private
...
...
@@ -180,6 +184,10 @@ class ChangelogEntry
File
.
write
(
file_path
,
contents
)
end
def
editor
ENV
[
'EDITOR'
]
end
def
amend_commit
fail_with
"git add failed"
unless
system
(
*
%W[git add
#{
file_path
}
]
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment