Skip to content

Commit

Permalink
[chore] remove dependabot config for gomod (#29472)
Browse files Browse the repository at this point in the history
Fixes
#19410

---------

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
Alex Boten committed Nov 24, 2023
1 parent cf49ee0 commit edce001
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 1,321 deletions.
1,104 changes: 0 additions & 1,104 deletions .github/dependabot.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ jobs:
run: |
make -j2 generate
git diff --exit-code ':!*go.sum' || (echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.' && exit 1)
- name: Check gendependabot
run: |
make -j2 gendependabot
git diff --exit-code ':!*go.sum' || (echo 'dependabot.yml is out of date, please run "make gendependabot" and commit the changes in this PR.' && exit 1)
- name: MultimodVerify
run: make multimod-verify
- name: Components dropdown in issue templates
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/create-dependabot-pr.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/scripts/dependabot-pr.sh

This file was deleted.

1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ When submitting a component to the community, consider breaking it down into sep
* `make genotelcontribcol`
* `make genoteltestbedcol`
* `make generate`
* `make gendependabot`
* `make multimod-verify`
* `make generate-gh-issue-templates`
* **Second PR** should include the concrete implementation of the component. If the
Expand Down
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,6 @@ push-tags: $(MULTIMOD)
git push ${REMOTE} $${tag}; \
done;

DEPENDABOT_PATH=".github/dependabot.yml"
.PHONY: gendependabot
gendependabot:
cd cmd/githubgen && $(GOCMD) install .
githubgen dependabot


# Define a delegation target for each module
.PHONY: $(ALL_MODS)
$(ALL_MODS):
Expand Down
115 changes: 0 additions & 115 deletions cmd/githubgen/dependabot.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/githubgen/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ go 1.20
require (
github.com/google/go-github/v53 v53.2.0
go.opentelemetry.io/collector/confmap v0.89.0
gopkg.in/yaml.v3 v3.0.1
)

require (
Expand All @@ -28,4 +27,5 @@ require (
golang.org/x/sys v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
21 changes: 3 additions & 18 deletions cmd/githubgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"fmt"
"io/fs"
"log"
"os"
"path/filepath"
"sort"

Expand All @@ -22,10 +21,9 @@ type generator interface {
generate(data *githubData) error
}

// Generates files specific to Github or Dependabot according to status metadata:
// Generates files specific to Github according to status metadata:
// .github/CODEOWNERS
// .github/ALLOWLIST
// .github/dependabot.yml
// .github/ISSUE_TEMPLATES/*.yaml (list of components)
func main() {
folder := flag.String("folder", ".", "folder investigated for codeowners")
Expand All @@ -36,16 +34,14 @@ func main() {
switch arg {
case "issue-templates":
generators = append(generators, issueTemplatesGenerator{})
case "dependabot":
generators = append(generators, dependabotGenerator{})
case "codeowners":
generators = append(generators, codeownersGenerator{})
default:
panic(fmt.Sprintf("Unknown generator: %s", arg))
}
}
if len(generators) == 0 {
generators = []generator{issueTemplatesGenerator{}, dependabotGenerator{}, codeownersGenerator{}}
generators = []generator{issueTemplatesGenerator{}, codeownersGenerator{}}
}
if err := run(*folder, *allowlistFilePath, generators); err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -81,7 +77,6 @@ type githubData struct {
allowlistFilePath string
maxLength int
components map[string]metadata
dependabotData *dependabotData
}

func loadMetadata(filePath string) (metadata, error) {
Expand All @@ -107,12 +102,6 @@ func run(folder string, allowlistFilePath string, generators []generator) error

components := map[string]metadata{}
var foldersList []string
dependabotData := &dependabotData{
Version: 2,
Updates: []dependabotUpdate{
newDependabotUpdate("", 5),
},
}
maxLength := 0
allCodeowners := map[string]struct{}{}
err := filepath.Walk(folder, func(path string, info fs.FileInfo, err error) error {
Expand All @@ -128,10 +117,7 @@ func run(folder string, allowlistFilePath string, generators []generator) error
key := currentFolder
components[key] = m
foldersList = append(foldersList, key)
_, err = os.Stat(filepath.Join(currentFolder, "go.mod"))
if err == nil { // go.mod file exists.
dependabotData.Updates = append(dependabotData.Updates, newDependabotUpdate(currentFolder, makePriority(m.Status)))
}

for stability := range m.Status.Stability {
if stability == unmaintainedStatus {
// do not account for unmaintained status to change the max length of the component line.
Expand Down Expand Up @@ -167,7 +153,6 @@ func run(folder string, allowlistFilePath string, generators []generator) error
allowlistFilePath: allowlistFilePath,
maxLength: maxLength,
components: components,
dependabotData: dependabotData,
}

for _, g := range generators {
Expand Down
1 change: 0 additions & 1 deletion extension/sigv4authextension/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@ Additionally, a few other files will be modified to reflect changes made, for ex
* `go.sum`
* `versions.yaml`
* `.github/CODEOWNERS`
* `.github/dependabot.yml` will be generated with "make dependabot" and not modified directly
* `cmd/configschema/go.mod`
* `internal/components/components.go`
* `internal/components/extensions_test.go`

0 comments on commit edce001

Please sign in to comment.