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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e865f959
Commit
e865f959
authored
Aug 28, 2020
by
Alessio Caiazza
Committed by
Jacob Vosmaer
Aug 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify changelog file presence in CI NO CHANGELOG
parent
556f449b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
.gitlab-ci.yml
.gitlab-ci.yml
+6
-0
_support/check_changelog.sh
_support/check_changelog.sh
+22
-0
No files found.
.gitlab-ci.yml
View file @
e865f959
...
...
@@ -22,6 +22,12 @@ verify:
script
:
-
make verify
changelog
:
script
:
-
_support/check_changelog.sh
rules
:
-
if
:
'
$CI_MERGE_REQUEST_IID'
.test
:
services
:
-
name
:
registry.gitlab.com/gitlab-org/build/cng/gitaly:latest
...
...
_support/check_changelog.sh
0 → 100755
View file @
e865f959
#!/bin/sh
set
-e
# we skip the changelog check if the merge requet title ends with "NO CHANGELOG"
if
echo
"
$CI_MERGE_REQUEST_TITLE
"
|
grep
-q
' NO CHANGELOG$'
;
then
echo
"Changelog not needed"
exit
0
fi
target
=
${
CI_MERGE_REQUEST_TARGET_BRANCH_NAME
:-
master
}
if
git diff
--name-only
"origin/
$target
"
|
grep
-q
'^changelogs/'
;
then
echo
"Changelog included"
else
echo
"Please add a changelog running '_support/changelog'"
echo
"or disable this check adding 'NO CHANGELOG' at the end of the merge request title"
echo
"/title
$CI_MERGE_REQUEST_TITLE
NO CHANGELOG"
exit
1
fi
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