Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bradley Wood
rust-gitlab
Commits
ce5b86ed
Commit
ce5b86ed
authored
Feb 02, 2018
by
Ben Boeckel
Browse files
webhooks: expose the confidential issue event flag
Fixes #11
parent
becce676
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gitlab.rs
View file @
ce5b86ed
...
...
@@ -195,6 +195,7 @@ impl Gitlab {
fn
event_flags
(
events
:
WebhookEvents
)
->
Vec
<
(
&
'static
str
,
&
'static
str
)
>
{
vec!
[(
"job_events"
,
Self
::
bool_param_value
(
events
.job
())),
(
"issues_events"
,
Self
::
bool_param_value
(
events
.issues
())),
(
"confidential_issues_events"
,
Self
::
bool_param_value
(
events
.confidential_issues
())),
(
"merge_requests_events"
,
Self
::
bool_param_value
(
events
.merge_requests
())),
(
"note_events"
,
Self
::
bool_param_value
(
events
.note
())),
(
"pipeline_events"
,
Self
::
bool_param_value
(
events
.pipeline
())),
...
...
src/types.rs
View file @
ce5b86ed
...
...
@@ -349,6 +349,8 @@ pub struct WebhookEvents {
job
:
bool
,
/// Whether to receive issue events of not.
issues
:
bool
,
/// Whether to receive confidential issue events of not.
confidential_issues
:
bool
,
/// Whether to receive merge request events of not.
merge_requests
:
bool
,
/// Whether to receive note (comment) events of not.
...
...
@@ -367,6 +369,7 @@ impl WebhookEvents {
WebhookEvents
{
job
:
false
,
issues
:
false
,
confidential_issues
:
false
,
merge_requests
:
false
,
note
:
false
,
pipeline
:
false
,
...
...
@@ -377,6 +380,7 @@ impl WebhookEvents {
with_event!
{
with_job
,
job
}
with_event!
{
with_issues
,
issues
}
with_event!
{
with_confidential_issues
,
issues
}
with_event!
{
with_merge_requests
,
merge_requests
}
with_event!
{
with_note
,
note
}
with_event!
{
with_pipeline
,
pipeline
}
...
...
@@ -385,6 +389,7 @@ impl WebhookEvents {
get_event!
{
job
}
get_event!
{
issues
}
get_event!
{
confidential_issues
}
get_event!
{
merge_requests
}
get_event!
{
note
}
get_event!
{
pipeline
}
...
...
Write
Preview
Supports
Markdown
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