• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jreleaser / jreleaser / #544

28 Oct 2025 03:56PM UTC coverage: 48.245% (-0.03%) from 48.273%
#544

push

github

web-flow
feat(announce): Add Reddit announcer support

Fixes #1457

188 of 414 new or added lines in 16 files covered. (45.41%)

6 existing lines in 2 files now uncovered.

26009 of 53910 relevant lines covered (48.25%)

0.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/api/jreleaser-model-api/src/main/java/org/jreleaser/model/api/announce/RedditAnnouncer.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 *
4
 * Copyright 2020-2025 The JReleaser authors.
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     https://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
package org.jreleaser.model.api.announce;
19

20
import java.util.Locale;
21

22
import static org.jreleaser.util.StringUtils.isBlank;
23

24
/**
25
 * @author Usman Shaikh
26
 * @since 1.21.0
27
 */
28
public interface RedditAnnouncer extends Announcer {
29
    String TYPE = "reddit";
30
    String REDDIT_CLIENT_ID = "REDDIT_CLIENT_ID";
31
    String REDDIT_CLIENT_SECRET = "REDDIT_CLIENT_SECRET";
32
    String REDDIT_USERNAME = "REDDIT_USERNAME";
33
    String REDDIT_PASSWORD = "REDDIT_PASSWORD";
34

35
    String getClientId();
36

37
    String getClientSecret();
38

39
    String getUsername();
40

41
    String getPassword();
42

43
    String getSubreddit();
44

45
    String getTitle();
46

47
    String getText();
48

49
    String getTextTemplate();
50

51
    String getUrl();
52

53
    SubmissionType getSubmissionType();
54

55
    /**
56
     * Reddit submission types
57
     */
58
    enum SubmissionType {
1✔
59
        SELF,       // Text post with body content
1✔
60
        LINK;       // Link post pointing to URLs
1✔
61

62
        public String formatted() {
NEW
63
            return name().toLowerCase(Locale.ENGLISH);
×
64
        }
65

66
        public static SubmissionType of(String str) {
NEW
67
            if (isBlank(str)) return null;
×
NEW
68
            return SubmissionType.valueOf(str.toUpperCase(Locale.ENGLISH).trim());
×
69
        }
70
    }
71
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc