Skip to content

Commit a478aba

Browse files
authored
Merge branch 'main' into trly/prompt_library
2 parents 26a34cc + 795f4d6 commit a478aba

19 files changed

Lines changed: 137 additions & 1792 deletions

.github/workflows/go-ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,18 @@ jobs:
3030
- run: |
3131
go test -race -v ./...
3232
go test -v ./...
33+
34+
# This job provides a stable name for branch protection rules
35+
# It will only pass if all Go CI matrix tests above pass
36+
go-test-complete:
37+
runs-on: ubuntu-latest
38+
needs: go-test
39+
if: always()
40+
steps:
41+
- name: Check Go CI results
42+
run: |
43+
if [[ "${{ needs.go-test.result }}" != "success" ]]; then
44+
echo "One or more Go CI tests failed"
45+
exit 1
46+
fi
47+
echo "All Go CI tests passed"

.github/workflows/semgrep.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Semgrep - SAST Scan
2+
3+
on:
4+
pull_request_target:
5+
types: [ closed, edited, opened, synchronize, ready_for_review ]
6+
7+
jobs:
8+
semgrep:
9+
permissions:
10+
contents: read # for actions/checkout to fetch code
11+
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
12+
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
13+
runs-on: ubuntu-latest
14+
container:
15+
image: returntocorp/semgrep
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.event.pull_request.head.ref }}
21+
repository: ${{ github.event.pull_request.head.repo.full_name }}
22+
23+
- name: Checkout semgrep-rules repo
24+
uses: actions/checkout@v4
25+
with:
26+
repository: sourcegraph/security-semgrep-rules
27+
token: ${{ secrets.GH_SEMGREP_SAST_TOKEN }}
28+
path: semgrep-rules
29+
30+
- name: Run Semgrep SAST Scan
31+
run: |
32+
mv semgrep-rules ../
33+
semgrep ci -f ../semgrep-rules/semgrep-rules/ --metrics=off --oss-only --suppress-errors --sarif -o results.sarif --exclude='semgrep-rules' --baseline-commit "$(git merge-base main HEAD)" || true
34+
- name: Upload SARIF file
35+
uses: github/codeql-action/upload-sarif@v3
36+
with:
37+
sarif_file: results.sarif

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ All notable changes to `src-cli` are documented in this file.
1111

1212
## Unreleased
1313

14+
### Added
15+
16+
- SBOM support: Added `--image` and `--exclude-image` flags to `src sbom fetch` for filtering which docker images SBOMs are fetched for. Both flags support glob patterns (e.g., `frontend`, `*api*`) and comma-separated lists. The `sourcegraph/` image name prefix is optional.
17+
18+
### Changed
19+
20+
- The deprecated `src extensions` commands have been removed.
21+
22+
## 6.4.0
23+
1424
## 6.3.0
1525

1626
## 6.2.0

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ We adhere to the [general Sourcegraph principles for testing](https://docs.sourc
8383
[...]
8484
```
8585
After updating the checksums, rerun the command to verify that the values are correct.
86-
4. Run `sg generate bazel` (this may not result in any changes)
86+
4. Run `sg generate bazel` and `sg bazel configure` (this may not result in any changes)
8787
4. Commit the changes, and open a PR.
8888
6. Once the version bump PR is merged and the commit is live on dotcom, check that the [curl commands in the README](README.md#installation) also fetch the new latest version.
8989

cmd/src/cmd.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import (
66
"log"
77
"os"
88
"slices"
9-
"strings"
10-
11-
"github.com/sourcegraph/sourcegraph/lib/errors"
129

1310
"github.com/sourcegraph/src-cli/internal/cmderrors"
1411
)
@@ -128,16 +125,3 @@ func (c commander) run(flagSet *flag.FlagSet, cmdName, usageText string, args []
128125
log.Printf("%s: unknown subcommand %q", cmdName, name)
129126
log.Fatalf("Run '%s help' for usage.", cmdName)
130127
}
131-
132-
func didYouMeanOtherCommand(actual string, suggested []string) *command {
133-
fullSuggestions := make([]string, len(suggested))
134-
for i, s := range suggested {
135-
fullSuggestions[i] = "src " + s
136-
}
137-
msg := fmt.Sprintf("src: unknown subcommand %q\n\nDid you mean:\n\n\t%s", actual, strings.Join(fullSuggestions, "\n\t"))
138-
return &command{
139-
flagSet: flag.NewFlagSet(actual, flag.ExitOnError),
140-
handler: func(args []string) error { return errors.New(msg) },
141-
usageFunc: func() { log.Println(msg) },
142-
}
143-
}

cmd/src/doc.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ Examples:
5656
"": &commands,
5757
"batch": &batchCommands,
5858
"config": &configCommands,
59-
"extensions": &extensionsCommands,
6059
"extsvc": &extsvcCommands,
6160
"code-intel": &codeintelCommands,
6261
"orgs": &orgsCommands,

cmd/src/extensions.go

Lines changed: 0 additions & 87 deletions
This file was deleted.

cmd/src/extensions_copy.go

Lines changed: 0 additions & 174 deletions
This file was deleted.

0 commit comments

Comments
 (0)