Skip to content

Commit 0b2e75c

Browse files
authored
Merge pull request #2238 from infosiftr/neo4j-not-short
Remove "neo4j" short tags special case
2 parents 0de6910 + a922fae commit 0b2e75c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

push.pl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ sub prompt_for_edit {
8989
$proposedText =~ s%$supportedTagsRegex%$sponsoredLinks$1$2%;
9090
}
9191

92-
my $alwaysShortTags = ($proposedFile eq 'neo4j/README.md');
93-
94-
if ($alwaysShortTags || ($lengthLimit > 0 && length($proposedText) > $lengthLimit)) {
92+
if ($lengthLimit > 0 && length($proposedText) > $lengthLimit) {
9593
# TODO https://github.com/docker/hub-beta-feedback/issues/238
9694
my $fullUrl = "$githubBase/$proposedFile";
9795
my $shortTags = "-\tSee [\"Supported tags and respective \`Dockerfile\` links\" at $fullUrl]($fullUrl#supported-tags-and-respective-dockerfile-links)\n\n";
@@ -100,16 +98,12 @@ sub prompt_for_edit {
10098
my $startingNote = $genericNote . "\n\n";
10199
my $endingNote = "\n\n...\n\n" . $genericNote;
102100

103-
$tagsNote = $shortTags if $alwaysShortTags;
104-
105101
my $trimmedText = $proposedText;
106102

107103
# if our text is too long for the Hub length limit, let's first try removing the "Supported tags" list and add $tagsNote and see if that's enough to let us put the full image documentation
108104
$trimmedText =~ s%$supportedTagsRegex%$sponsoredLinks$1$tagsNote%ms;
109105
# (we scrape until the next "h1" or a line starting with a link which is likely a build status badge for an architecture-namespace)
110106

111-
$proposedText = $trimmedText if $alwaysShortTags;
112-
113107
if (length($trimmedText) > $lengthLimit) {
114108
# ... if that doesn't do the trick, then do our older naïve description trimming
115109
$trimmedText = $startingNote . substr $proposedText, 0, ($lengthLimit - length($startingNote . $endingNote));

0 commit comments

Comments
 (0)