Skip to content

Commit 04cac57

Browse files
authored
Remove GITLAB_COMMIT_* environment variables. (#216)
Co-authored-by: Barney Gale <barney.gale@foundry.com>
1 parent bcc7660 commit 04cac57

File tree

2 files changed

+0
-38
lines changed

2 files changed

+0
-38
lines changed

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -550,22 +550,6 @@ GITLAB_REPO_HOMEPAGE
550550
GITLAB_REPO_GIT_SSH_URL
551551
GITLAB_REPO_GIT_HTTP_URL
552552
GITLAB_REPO_VISIBILITY_LEVEL
553-
GITLAB_COMMIT_COUNT
554-
GITLAB_COMMIT_ID_#
555-
GITLAB_COMMIT_MESSAGE_#
556-
GITLAB_COMMIT_TIMESTAMP_#
557-
GITLAB_COMMIT_URL_#
558-
GITLAB_COMMIT_AUTHOR_AVATAR_URL_#
559-
GITLAB_COMMIT_AUTHOR_CREATED_AT_#
560-
GITLAB_COMMIT_AUTHOR_EMAIL_#
561-
GITLAB_COMMIT_AUTHOR_ID_#
562-
GITLAB_COMMIT_AUTHOR_NAME_#
563-
GITLAB_COMMIT_AUTHOR_STATE_#
564-
GITLAB_COMMIT_AUTHOR_USERNAME_#
565-
GITLAB_COMMIT_AUTHOR_WEB_URL_#
566-
GITLAB_COMMIT_ADDED_#
567-
GITLAB_COMMIT_MODIFIED_#
568-
GITLAB_COMMIT_REMOVED_#
569553
GITLAB_REQUEST_URL
570554
GITLAB_REQUEST_STRING
571555
GITLAB_REQUEST_TOKEN

src/main/java/io/jenkins/plugins/gitlabbranchsource/Cause/GitLabPushCauseData.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
import org.kohsuke.stapler.export.Exported;
77
import org.kohsuke.stapler.export.ExportedBean;
88

9-
import static io.jenkins.plugins.gitlabbranchsource.Cause.GitLabCauseUtils.defaultDateString;
10-
import static io.jenkins.plugins.gitlabbranchsource.Cause.GitLabCauseUtils.defaultIntString;
11-
import static io.jenkins.plugins.gitlabbranchsource.Cause.GitLabCauseUtils.defaultListSize;
129
import static io.jenkins.plugins.gitlabbranchsource.Cause.GitLabCauseUtils.defaultLongString;
1310
import static io.jenkins.plugins.gitlabbranchsource.Cause.GitLabCauseUtils.defaultVisibilityString;
1411
import static org.apache.commons.lang.StringUtils.defaultString;
@@ -51,25 +48,6 @@ public GitLabPushCauseData(PushEvent pushEvent) {
5148
this.variables.put("GITLAB_REPO_GIT_SSH_URL", defaultString(pushEvent.getRepository().getGit_ssh_url()));
5249
this.variables.put("GITLAB_REPO_GIT_HTTP_URL", defaultString(pushEvent.getRepository().getGit_http_url()));
5350
this.variables.put("GITLAB_REPO_VISIBILITY_LEVEL", defaultVisibilityString(pushEvent.getRepository().getVisibility_level()));
54-
this.variables.put("GITLAB_COMMIT_COUNT", defaultIntString(pushEvent.getTotalCommitsCount()));
55-
int totalCommitsCount = defaultListSize(pushEvent.getCommits());
56-
for(int index = 0; index < totalCommitsCount; index++) {
57-
this.variables.put("GITLAB_COMMIT_ID_" + index+1, defaultString(pushEvent.getCommits().get(index).getId()));
58-
this.variables.put("GITLAB_COMMIT_MESSAGE_" + index+1, defaultString(pushEvent.getCommits().get(index).getMessage()));
59-
this.variables.put("GITLAB_COMMIT_TIMESTAMP_" + index+1, defaultDateString(pushEvent.getCommits().get(index).getTimestamp()));
60-
this.variables.put("GITLAB_COMMIT_URL_" + index+1, defaultString(pushEvent.getCommits().get(index).getUrl()));
61-
this.variables.put("GITLAB_COMMIT_AUTHOR_AVATAR_URL_" + index+1, defaultString(pushEvent.getCommits().get(index).getAuthor().getAvatarUrl()));
62-
this.variables.put("GITLAB_COMMIT_AUTHOR_CREATED_AT_" + index+1, defaultDateString(pushEvent.getCommits().get(index).getAuthor().getCreatedAt()));
63-
this.variables.put("GITLAB_COMMIT_AUTHOR_EMAIL_" + index+1, defaultString(pushEvent.getCommits().get(index).getAuthor().getEmail()));
64-
this.variables.put("GITLAB_COMMIT_AUTHOR_ID_" + index+1, defaultLongString(pushEvent.getCommits().get(index).getAuthor().getId()));
65-
this.variables.put("GITLAB_COMMIT_AUTHOR_NAME_" + index+1, defaultString(pushEvent.getCommits().get(index).getAuthor().getName()));
66-
this.variables.put("GITLAB_COMMIT_AUTHOR_STATE_" + index+1, defaultString(pushEvent.getCommits().get(index).getAuthor().getState()));
67-
this.variables.put("GITLAB_COMMIT_AUTHOR_USERNAME_" + index+1, defaultString(pushEvent.getCommits().get(index).getAuthor().getUsername()));
68-
this.variables.put("GITLAB_COMMIT_AUTHOR_WEB_URL_" + index+1, defaultString(pushEvent.getCommits().get(index).getAuthor().getWebUrl()));
69-
this.variables.put("GITLAB_COMMIT_ADDED_" + index+1, String.join(", ", pushEvent.getCommits().get(index).getAdded()));
70-
this.variables.put("GITLAB_COMMIT_MODIFIED_" + index+1, String.join(", ", pushEvent.getCommits().get(index).getModified()));
71-
this.variables.put("GITLAB_COMMIT_REMOVED_" + index+1, String.join(", ", pushEvent.getCommits().get(index).getRemoved()));
72-
}
7351
this.variables.put("GITLAB_REQUEST_URL", defaultString(pushEvent.getRequestUrl()));
7452
this.variables.put("GITLAB_REQUEST_STRING", defaultString(pushEvent.getRequestQueryString()));
7553
this.variables.put("GITLAB_REQUEST_TOKEN", defaultString(pushEvent.getRequestSecretToken()));

0 commit comments

Comments
 (0)