Skip to content

Commit c009b06

Browse files
committed
[githubgen] Stop generating the .github/ALLOWLIST file
1 parent bd3bf23 commit c009b06

File tree

5 files changed

+20
-25
lines changed

5 files changed

+20
-25
lines changed

.chloggen/remove_allowlistgen.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: breaking
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. crosslink)
5+
component: githubgen
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Stop generating the .github/ALLOWLIST file
9+
10+
# One or more tracking issues related to the change
11+
issues: [1505]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext: |
17+
This file has no bearing to GitHub, the CODEOWNERS file already contains a list of unmaintained components.
18+
Further, this file is flagged incorrectly by security tools as problematic.

githubgen/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# githubgen
22

3-
This executable is used to generate `.github/CODEOWNERS` and
4-
`.github/ALLOWLIST` files.
3+
This executable is used to generate `.github/CODEOWNERS` files.
54

65
It reads status metadata from `metadata.yaml` files located throughout the
76
repository.

githubgen/codeowners.go

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,17 @@ func (cg *codeownersGenerator) Generate(data datatype.GithubData) error {
3636
return err
3737
}
3838

39-
var ownerComponents, allowListUnmaintainedComponents, unmaintainedCodeowners, distributions, allowListDeprecatedComponents []string
39+
var ownerComponents, unmaintainedCodeowners, distributions []string
4040

4141
LOOP:
4242
for _, folder := range data.Folders {
4343
m := data.Components[folder]
4444
// check if component is unmaintained or deprecated
4545
for stability := range m.Status.Stability {
4646
if stability == unmaintainedStatus {
47-
allowListUnmaintainedComponents = append(allowListUnmaintainedComponents, folder)
4847
unmaintainedCodeowners = append(unmaintainedCodeowners, fmt.Sprintf("%s/%s %s", folder, strings.Repeat(" ", data.MaxLength-len(folder)), data.DefaultCodeOwner))
4948
continue LOOP
5049
}
51-
if stability == deprecatedStatus && (m.Status.Codeowners == nil || len(m.Status.Codeowners.Active) == 0) {
52-
allowListDeprecatedComponents = append(allowListDeprecatedComponents, folder+"/\n")
53-
}
5450
}
5551

5652
// check and handle active codeowners
@@ -95,21 +91,6 @@ LOOP:
9591
if err != nil {
9692
return err
9793
}
98-
99-
// ALLOWLIST file
100-
allowListFile := filepath.Join(data.RootFolder, ".github", "ALLOWLIST")
101-
allowListContents, err := cg.getFile(allowListFile)
102-
if err != nil {
103-
return err
104-
}
105-
106-
allowListContents = injectContent(startUnmaintainedList, endUnmaintainedList, allowListContents, allowListUnmaintainedComponents)
107-
allowListContents = injectContent(startDeprecatedList, endDeprecatedList, allowListContents, allowListDeprecatedComponents)
108-
109-
err = cg.setFile(allowListFile, allowListContents)
110-
if err != nil {
111-
return err
112-
}
11394
return nil
11495
}
11596

githubgen/constants.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ const startComponentList = `# Start components list`
66
const endComponentList = `# End components list`
77
const startUnmaintainedList = `# Start unmaintained components list`
88
const endUnmaintainedList = `# End unmaintained components list`
9-
const startDeprecatedList = `# Start deprecated components list`
10-
const endDeprecatedList = `# End deprecated components list`
119
const startDistributionList = `# Start distribution list`
1210
const endDistributionList = `# End distribution list`
1311
const unmaintainedStatus = "unmaintained"

githubgen/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020

2121
// Generates files specific to GitHub according to status datatype.Metadata:
2222
// .github/CODEOWNERS
23-
// .github/ALLOWLIST
2423
// .github/ISSUE_TEMPLATES/*.yaml (list of components)
2524
// reports/distributions/*
2625
func main() {

0 commit comments

Comments
 (0)