Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also 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: open-sauced/pizza-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.0-beta.9
Choose a base ref
...
head repository: open-sauced/pizza-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: beta
Choose a head ref
Loading
Showing with 5,621 additions and 644 deletions.
  1. +3 −0 .env
  2. +18 −0 .github/workflows/pizza.yml
  3. +41 −0 .github/workflows/release.yaml
  4. +1 −1 .github/workflows/test.yaml
  5. +13 −2 .golangci.yaml
  6. +2 −1 .sauced.yaml
  7. +341 −0 CHANGELOG.md
  8. +97 −23 CODEOWNERS
  9. +3 −1 Dockerfile
  10. +264 −62 README.md
  11. +23 −11 api/auth/auth.go
  12. +57 −117 api/auth/success.html
  13. +48 −0 api/client.go
  14. +23 −0 api/mock/mock.go
  15. +190 −0 api/services/contributors/contributors.go
  16. +295 −0 api/services/contributors/contributors_test.go
  17. +18 −0 api/services/contributors/spec.go
  18. +56 −0 api/services/histogram/histogram.go
  19. +52 −0 api/services/histogram/histogram_test.go
  20. +22 −0 api/services/histogram/spec.go
  21. +80 −0 api/services/repository/repository.go
  22. +111 −0 api/services/repository/repository_test.go
  23. +102 −0 api/services/repository/spec.go
  24. +10 −0 api/services/spec.go
  25. +46 −0 api/services/workspaces/spec.go
  26. +48 −0 api/services/workspaces/userlists/spec.go
  27. +192 −0 api/services/workspaces/userlists/userlists.go
  28. +178 −0 api/services/workspaces/userlists/userlists_test.go
  29. +121 −0 api/services/workspaces/workspaces.go
  30. +112 −0 api/services/workspaces/workspaces_test.go
  31. +7 −0 api/utils/validators.go
  32. +12 −13 cmd/auth/auth.go
  33. +78 −0 cmd/docs/docs.go
  34. +82 −0 cmd/docs/docs_test.go
  35. +91 −26 cmd/generate/codeowners/codeowners.go
  36. +38 −6 cmd/generate/codeowners/output.go
  37. +41 −1 cmd/generate/codeowners/output_test.go
  38. +1 −1 cmd/generate/codeowners/traversal.go
  39. +177 −0 cmd/generate/config/config.go
  40. +42 −0 cmd/generate/config/output.go
  41. +149 −0 cmd/generate/config/spec.go
  42. +7 −5 cmd/generate/generate.go
  43. +332 −0 cmd/generate/insight/insight.go
  44. +72 −60 cmd/insights/contributors.go
  45. +3 −0 cmd/insights/insights.go
  46. +60 −57 cmd/insights/repositories.go
  47. +16 −23 cmd/insights/user-contributions.go
  48. +5 −6 cmd/insights/utils.go
  49. +139 −0 cmd/offboard/offboard.go
  50. +87 −0 cmd/offboard/output.go
  51. +25 −8 cmd/root/root.go
  52. +1 −1 cmd/version/version.go
  53. +31 −0 docs/pizza.md
  54. +33 −0 docs/pizza_completion.md
  55. +52 −0 docs/pizza_completion_bash.md
  56. +43 −0 docs/pizza_completion_fish.md
  57. +40 −0 docs/pizza_completion_powershell.md
  58. +54 −0 docs/pizza_completion_zsh.md
  59. +34 −0 docs/pizza_generate.md
  60. +68 −0 docs/pizza_generate_codeowners.md
  61. +37 −0 docs/pizza_generate_config.md
  62. +48 −0 docs/pizza_generate_insight.md
  63. +35 −0 docs/pizza_insights.md
  64. +34 −0 docs/pizza_insights_contributors.md
  65. +34 −0 docs/pizza_insights_repositories.md
  66. +36 −0 docs/pizza_insights_user-contributions.md
  67. +34 −0 docs/pizza_login.md
  68. +33 −0 docs/pizza_offboard.md
  69. +27 −0 docs/pizza_version.md
  70. +9 −4 go.mod
  71. +8 −4 go.sum
  72. +113 −43 justfile
  73. +2 −2 main.go
  74. +133 −0 npm/.gitignore
  75. +149 −37 npm/README.md
  76. +17 −0 npm/package-lock.json
  77. +2 −2 npm/package.json
  78. +0 −34 pkg/api/client.go
  79. +0 −5 pkg/api/validation.go
  80. +37 −27 pkg/config/config.go
  81. +57 −16 pkg/config/config_test.go
  82. +4 −0 pkg/config/spec.go
  83. +1 −1 pkg/constants/flags.go
  84. +201 −43 pkg/utils/posthog.go
  85. +3 −1 pkg/utils/root.go
  86. +66 −0 pkg/utils/telemetry.go
  87. +24 −0 scripts/generate-docs.sh
  88. +90 −0 telemetry.go
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Env vars used in the justfile during buildtime

POSTHOG_PUBLIC_API_KEY="phc_Y0xz6nK55MEwWjobJsI2P8rsiomZJ6eZLoXehmMy9tt"
18 changes: 18 additions & 0 deletions .github/workflows/pizza.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: OpenSauced Pizza Action

on:
schedule:
# Run once a week on Sunday at 00:00 UTC
- cron: "0 0 * * 0"
workflow_dispatch: # Allow manual triggering

jobs:
pizza-action:
runs-on: ubuntu-latest
steps:
- name: Pizza Action
uses: open-sauced/pizza-action@v2.4.0
with:
cli-version: "v2.2.0"
commit-and-pr: "true"
pr-title: "chore: update repository codeowners"
41 changes: 41 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -40,6 +40,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: "./npm/package-lock.json"

- name: "🔧 install npm@latest"
run: npm i -g npm@latest
@@ -57,10 +59,46 @@ jobs:
NPM_PACKAGE_ROOT: "npm"
SKIP_DOCKER_PUBLISH: true

docs:
name: Update documentation
needs:
- release

runs-on: ubuntu-latest

steps:
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.OS_GITHUB_APP_ID }}
private_key: ${{ secrets.OS_GITHUB_APP_PRIVATE_KEY }}

- name: "☁️ checkout repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}

- name: "🐹 Setup Go"
uses: actions/setup-go@v5
with:
go-version: 1.22.x

- name: "🤲 Setup Just"
uses: extractions/setup-just@v2

- name: "📗 Generate Documentation"
run: ./scripts/generate-docs.sh
env:
GITHUB_REF: ${{ github.ref }}
GH_TOKEN: ${{ steps.generate_token.outputs.token }}

build:
name: Build and publish artifacts
needs:
- release
- docs
if: needs.release.outputs.release-tag != ''
runs-on: ubuntu-latest
permissions:
@@ -117,3 +155,6 @@ jobs:
with:
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ needs.release.outputs.release-tag }}
push: true
build-args: |
VERSION=${{ needs.release.outputs.release-tag }}
POSTHOG_PUBLIC_API_KEY=${{ vars.POSTHOG_WRITE_PUBLIC_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
version: v1.60

test:
runs-on: ubuntu-latest
15 changes: 13 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
linters:
enable:
- asasalint
- asciicheck
- bidichk
- canonicalheader
- errcheck
- gci
- goimports
- gocritic
- gosec
- govet
- ineffassign
- misspell
- revive
- perfsprint
- staticcheck
- unconvert
- unused
- govet
- gci
- testifylint

linters-settings:
gci:
@@ -23,3 +31,6 @@ linters-settings:

run:
timeout: 5m

# attempts to automatically fix linting errors that are fixable by supported linters
fix: true
3 changes: 2 additions & 1 deletion .sauced.yaml
Original file line number Diff line number Diff line change
@@ -12,4 +12,5 @@ attribution:
nickytonline:
- nick@nickyt.co
- nick@opensauced.pizza

zeucapua:
- coding@zeu.dev
Loading