Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: unconditionalday/api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9382717f7dbd00aa4e3cd01f53ba6f9a282ebe67
Choose a base ref
..
head repository: unconditionalday/api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 90404a0b36a97c81e3e0521a516ad528b72d7f0d
Choose a head ref
Showing with 82 additions and 28 deletions.
  1. +41 −0 .github/workflows/db-auto-merge.yaml
  2. +9 −0 api/api.gen.go
  3. +27 −24 api/swagger.yaml
  4. +1 −0 cmd/serve.go
  5. +1 −1 fly.toml
  6. +2 −2 go.sum
  7. +1 −1 internal/parser/parser.go
41 changes: 41 additions & 0 deletions .github/workflows/db-auto-merge.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<<<<<<< HEAD
<<<<<<< HEAD
name: Dependabot auto-merge
on: pull_request

@@ -17,6 +19,45 @@ jobs:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --rebase "$PR_URL"
<<<<<<< HEAD
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
=======
name: auto-merge
=======
name: Dependabot auto-merge
on: pull_request
>>>>>>> b8ec7e1 (fix: use auto-merge from gh docs)

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
<<<<<<< HEAD
target: minor
<<<<<<< HEAD
github-token: ${{ github.token }}
>>>>>>> 0e7e5ce (feat: add dependabot auto-merge)
=======
github-token: ${{ secrets.ACCESS_TOKEN }}
>>>>>>> 4b36d7b (chore: use custom private secret for dependabot)
=======
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
=======
>>>>>>> b345346 (chore: dependabot auto-rebase instead of auto-merge)
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
>>>>>>> b8ec7e1 (fix: use auto-merge from gh docs)
9 changes: 9 additions & 0 deletions api/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 27 additions & 24 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
@@ -3,11 +3,11 @@ x-stoplight:
id: zo1541bc64oxo
info:
title: Unconditional
version: "1.0"
version: '1.0'
servers:
- url: "https://api.unconditional.day/v1"
- url: "http://localhost:8080"
- url: "127.0.0.1:8080"
- url: 'https://api.unconditional.day/v1'
- url: 'http://localhost:8080'
- url: '127.0.0.1:8080'
paths:
"/v1/search/feed/{query}":
get:
@@ -35,6 +35,27 @@ paths:
type: string
x-stoplight:
id: pacmz9rv7a1k1
/v1/version:
get:
summary: Your GET endpoint
tags: []
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/ServerVersion"
operationId: get-v1-version
x-stoplight:
id: flrb4hew86v1s
requestBody:
content:
application/json:
schema:
type: object
properties: {}
/v1/informer/wiki/{query}:
get:
responses:
@@ -58,26 +79,7 @@ paths:
required: true
schema:
type: string
/v1/version:
get:
summary: Your GET endpoint
tags: []
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ServerVersion"
operationId: get-v1-version
x-stoplight:
id: flrb4hew86v1s
requestBody:
content:
application/json:
schema:
type: object
properties: {}

components:
schemas:
FeedItem:
@@ -120,6 +122,7 @@ components:
- title
x-stoplight:
id: g5p7hclip2ydk

WikiResult:
type: object
properties:
1 change: 1 addition & 0 deletions cmd/serve.go
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ import (
"github.com/unconditionalday/server/internal/service"
"github.com/unconditionalday/server/internal/version"
cobrax "github.com/unconditionalday/server/internal/x/cobra"
"go.uber.org/zap"
)

var (
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
@@ -42,4 +42,4 @@ processes = []
interval = "15s"
restart_limit = 2
timeout = "10s"


4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -299,7 +299,6 @@ github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3x
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4=
github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ=
github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8=
@@ -336,6 +335,7 @@ github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM=
github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4=
github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
@@ -432,6 +432,7 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ=
go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw=
@@ -768,7 +769,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion internal/parser/parser.go
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ func removeHTML(content string) string {
// function to remove new lines from the content using regex
func removeNewLines(content string) string {
// regex to match the text to remove
re := regexp.MustCompile(`\r?\n`)
re := regexp.MustCompile(` ?\n`)

return re.ReplaceAllString(content, "")
}