jenkinsci / jenkinsci/gitlab-plugin

how to ignore push-event with empty commits when creating a branch?

Open
#844 2 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
Java
Stars
1.4k
Forks
615
Avg merge
4h 32m
Merged PRs (30d)
10

Description

A push-event triggers when a matched branch was created, the gitlab request body details looks like this:

~~~
{
"object_kind": "push",
"event_name": "push",
"before": "0000000000000000000000000000000000000000",
"after": "f34c80f418afb802094f1ba42ad0ec1a20c7a02s",
"ref": "refs/heads/2.2.0/release",
"checkout_sha": "f34c80f418afb802094f1ba42ad0ec1a20c7a02b",
"message": null,
"user_id": 87,
"project_id": 150,
"project": {
...
},
"commits": [

],
"total_commits_count": 0,
"repository": {
...
}
}
~~~

My probem is: **how to pervent jenkins from buliding when a push-event triggers with empty commits?**

![22222213916](https://user-images.githubusercontent.com/3498363/46775528-2063aa80-cd3a-11e8-9b80-deac6e355dc4.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.