Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
slash-done
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
slash-done
Merge requests
!2
Mattermost/Slack send a JSON payload for a Slash command
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Mattermost/Slack send a JSON payload for a Slash command
develop
into
master
Overview
0
Commits
2
Changes
1
Merged
Erick Hitter
requested to merge
develop
into
master
8 years ago
Overview
0
Commits
2
Changes
1
Expand
0
0
Merge request reports
Compare
master
version 1
26c35a9d
8 years ago
master (base)
and
version 1
latest version
9232bad6
2 commits,
8 years ago
version 1
26c35a9d
1 commit,
8 years ago
1 file
+
3
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
index.js
+
3
−
3
Options
@@ -27,12 +27,12 @@ app.get( '/', function( req, res ) {
// Parse POST body to create WP post
app
.
post
(
'
/log
'
,
function
(
req
,
res
)
{
// Don't bother if there's nothing to record
if
(
'
undefined
'
===
typeof
req
.
body
||
!
req
.
body
.
length
)
{
if
(
'
undefined
'
===
typeof
req
.
body
||
'
undefined
'
===
typeof
req
.
body
.
text
||
!
req
.
body
.
text
.
length
)
{
return
res
.
sendStatus
(
400
);
}
// Massage the title
var
title
=
req
.
body
;
var
title
=
req
.
body
.
text
;
title
=
striptags
(
title
,
[]
);
if
(
title
.
length
>
30
)
{
@@ -43,7 +43,7 @@ app.post( '/log', function( req, res ) {
}
// Decorate the content
var
content
=
req
.
body
;
var
content
=
req
.
body
.
text
;
content
=
striptags
(
content
,
[
'
a
'
,
'
code
'
,
'
strong
'
,
'
em
'
]
);
content
=
'
<blockquote>
'
+
content
+
"
</blockquote>
\n\n
#slash-done
"
;
Loading