Skip to content

Commit

Permalink
feat(links): merge links lines together
Browse files Browse the repository at this point in the history
- need help and discussion (same link)
- bug and new feature (same link)
  • Loading branch information
qdm12 committed Aug 5, 2024
1 parent f0fba49 commit 00102fb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ Running version v1.1.1 built on 2021-07-14 (commit c892ef2)
📣 hello world
🔧 Need help? https://github.com/qdm12/gosplash/discussions/new
🐛 Bug? https://github.com/qdm12/gosplash/issues/new
✨ New feature? https://github.com/qdm12/gosplash/issues/new
☕ Discussion? https://github.com/qdm12/gosplash/discussions/new
🔧 Need help? ☕ Discussion? https://github.com/qdm12/gosplash/discussions/new
🐛 Bug? ✨ New feature? https://github.com/qdm12/gosplash/issues/new
💻 Email? quentin.mcgaw@gmail.com
💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
```
Expand Down
6 changes: 2 additions & 4 deletions examples/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ func main() {

// 📣 new feature 🎉

// 🔧 Need help? https://github.com/qdm12/gosplash/discussions/new
// 🐛 Bug? https://github.com/qdm12/gosplash/issues/new
// ✨ New feature? https://github.com/qdm12/gosplash/issues/new
// ☕ Discussion? https://github.com/qdm12/gosplash/discussions/new
// 🔧 Need help? ☕ Discussion? https://github.com/qdm12/gosplash/discussions/new
// 🐛 Bug? ✨ New feature? https://github.com/qdm12/gosplash/issues/new
// 💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12
6 changes: 2 additions & 4 deletions gosplash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ func Test_MakeLines(t *testing.T) { //nolint:tparallel
"",
"📣 hello world",
"",
"🔧 Need help? https://github.com/qdm12/gosplash/discussions/new",
"🐛 Bug? https://github.com/qdm12/gosplash/issues/new",
"✨ New feature? https://github.com/qdm12/gosplash/issues/new",
"☕ Discussion? https://github.com/qdm12/gosplash/discussions/new",
"🔧 Need help? ☕ Discussion? https://github.com/qdm12/gosplash/discussions/new",
"🐛 Bug? ✨ New feature? https://github.com/qdm12/gosplash/issues/new",
"💻 Email? quentin.mcgaw@gmail.com",
"💰 Help me? https://www.paypal.me/qmcgaw https://github.com/sponsors/qdm12",
},
Expand Down
6 changes: 2 additions & 4 deletions internal/links/links.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ func MakeLines(rootURL, user, repo string, emails []string,
rootURL = strings.TrimSuffix(rootURL, "/")
if rootURL != "" && user != "" && repo != "" {
repoURL := rootURL + "/" + user + "/" + repo
lines = append(lines, "🔧 Need help? "+repoURL+"/discussions/new")
lines = append(lines, "🐛 Bug? "+repoURL+"/issues/new")
lines = append(lines, "✨ New feature? "+repoURL+"/issues/new")
lines = append(lines, "☕ Discussion? "+repoURL+"/discussions/new")
lines = append(lines, "🔧 Need help? ☕ Discussion? "+repoURL+"/discussions/new")
lines = append(lines, "🐛 Bug? ✨ New feature? "+repoURL+"/issues/new")
}

if len(emails) > 0 {
Expand Down
6 changes: 2 additions & 4 deletions internal/links/links_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ func Test_MakeLines(t *testing.T) {
user: "qdm12",
repo: "gosplash",
lines: []string{
"🔧 Need help? https://github.com/qdm12/gosplash/discussions/new",
"🐛 Bug? https://github.com/qdm12/gosplash/issues/new",
"✨ New feature? https://github.com/qdm12/gosplash/issues/new",
"☕ Discussion? https://github.com/qdm12/gosplash/discussions/new",
"🔧 Need help? ☕ Discussion? https://github.com/qdm12/gosplash/discussions/new",
"🐛 Bug? ✨ New feature? https://github.com/qdm12/gosplash/issues/new",
},
},
"emails": {
Expand Down

0 comments on commit 00102fb

Please sign in to comment.