Skip to content

Commit 39fcee0

Browse files
2 parents d1313c9 + 99476e9 commit 39fcee0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7686
-180
lines changed

.air.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ tmp_dir = "bin"
2121
poll = false
2222
poll_interval = 0
2323
post_cmd = []
24-
pre_cmd = []
24+
pre_cmd = ["make gen-docs"]
2525
rerun = false
2626
rerun_delay = 500
2727
send_interrupt = false

.chglog/CHANGELOG.tpl.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{{ if .Versions -}}
2+
<a name="unreleased"></a>
3+
## [Unreleased]
4+
5+
{{ if .Unreleased.CommitGroups -}}
6+
{{ range .Unreleased.CommitGroups -}}
7+
### {{ .Title }}
8+
{{ range .Commits -}}
9+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
10+
{{ end }}
11+
{{ end -}}
12+
{{ end -}}
13+
{{ end -}}
14+
15+
{{ range .Versions }}
16+
<a name="{{ .Tag.Name }}"></a>
17+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
18+
{{ range .CommitGroups -}}
19+
### {{ .Title }}
20+
{{ range .Commits -}}
21+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
22+
{{ end }}
23+
{{ end -}}
24+
25+
{{- if .RevertCommits -}}
26+
### Reverts
27+
{{ range .RevertCommits -}}
28+
- {{ .Revert.Header }}
29+
{{ end }}
30+
{{ end -}}
31+
32+
{{- if .MergeCommits -}}
33+
### Pull Requests
34+
{{ range .MergeCommits -}}
35+
- {{ .Header }}
36+
{{ end }}
37+
{{ end -}}
38+
39+
{{- if .NoteGroups -}}
40+
{{ range .NoteGroups -}}
41+
### {{ .Title }}
42+
{{ range .Notes }}
43+
{{ .Body }}
44+
{{ end }}
45+
{{ end -}}
46+
{{ end -}}
47+
{{ end -}}
48+
49+
{{- if .Versions }}
50+
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
51+
{{ range .Versions -}}
52+
{{ if .Tag.Previous -}}
53+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
54+
{{ end -}}
55+
{{ end -}}
56+
{{ end -}}

.chglog/config.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/karthikbhandary2/Social
6+
options:
7+
commits:
8+
# filters:
9+
# Type:
10+
# - feat
11+
# - fix
12+
# - perf
13+
# - refactor
14+
commit_groups:
15+
# title_maps:
16+
# feat: Features
17+
# fix: Bug Fixes
18+
# perf: Performance Improvements
19+
# refactor: Code Refactoring
20+
header:
21+
pattern: "^(\\w*)\\:\\s(.*)$"
22+
pattern_maps:
23+
- Type
24+
- Subject
25+
notes:
26+
keywords:
27+
- BREAKING CHANGE

.envrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export ADDR=":8082"
2-
export DB_ADDR="postgres://Karthik:1234@localhost/social?sslmode=disable"
2+
export DB_ADDR="postgres://Karthik:1234@localhost/social?sslmode=disable"
3+
export REDIS_ENABLE="true"

.github/workflows/audit.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Audit
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
audit:
11+
runs-on: ubuntu-20.04
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: '1.23.4'
18+
19+
- name: Verify Dependecies
20+
run: go mod verify
21+
22+
- name: Build
23+
run: go build -v ./...
24+
25+
- name: Run go vet
26+
run: go vet ./...
27+
28+
- name: Install staticcheck
29+
run: go install honnef.co/go/tools/cmd/staticcheck@latest
30+
31+
- name: Run staticcheck
32+
run: staticcheck ./...
33+
34+
# - name: Run Tests
35+
# run: go test -race ./...
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
update-changelog:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
ref: master
21+
22+
- name: Setup git-chglog
23+
run: |
24+
CHGLOG_VERSION="0.9.1"
25+
curl -o git-chglog -L "https://github.com/git-chglog/git-chglog/releases/download/${CHGLOG_VERSION}/git-chglog_linux_amd64"
26+
chmod +x git-chglog
27+
28+
- name: Generate CHANGELOG.md
29+
id: generate
30+
run: |
31+
rm -f CHANGELOG.md
32+
./git-chglog -o CHANGELOG.md
33+
if git diff --quiet CHANGELOG.md; then
34+
echo "changes=false" >> $GITHUB_OUTPUT
35+
else
36+
echo "changes=true" >> $GITHUB_OUTPUT
37+
fi
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.CHANGELOG_TOKEN }}
40+
41+
- name: Cleanup
42+
run: rm git-chglog
43+
if: always()
44+
45+
- name: Create Pull Request
46+
if: steps.generate.outputs.changes == 'true'
47+
uses: peter-evans/create-pull-request@v4
48+
with:
49+
token: ${{ secrets.CHANGELOG_TOKEN }}
50+
commit-message: "chore: update CHANGELOG.md"
51+
title: "📝 Update Changelog"
52+
body: |
53+
This PR updates the CHANGELOG.md to include all releases.
54+
- Generated using git-chglog
55+
- Triggered by: ${{ github.event_name }}
56+
- Auto-merge enabled
57+
branch: update-changelog-${{ github.run_id }}
58+
base: master
59+
delete-branch: true
60+
labels: documentation, automated-pr
61+
62+
- name: Enable Auto-merge
63+
if: steps.generate.outputs.changes == 'true'
64+
run: |
65+
gh pr merge --auto --merge "${{ steps.create-pr.outputs.pull-request-number }}"
66+
env:
67+
GH_TOKEN: ${{ secrets.CHANGELOG_TOKEN }}

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

bin/build-errors.log

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)