add workflow to create PR for spdx license list updates (#4319)

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
This commit is contained in:
Alex Goodman
2025-10-30 12:14:13 -04:00
committed by GitHub
parent efc2f0012c
commit 5db3a9bf55
2 changed files with 55 additions and 5 deletions
@@ -10,7 +10,6 @@ import (
"sort"
"strings"
"text/template"
"time"
)
// This program generates license_list.go.
@@ -20,8 +19,7 @@ const (
)
var tmp = template.Must(template.New("").Parse(`// Code generated by go generate; DO NOT EDIT.
// This file was generated by robots at {{ .Timestamp }}
// using data from {{ .URL }}
// This file was generated using data from {{ .URL }}
package spdxlicense
const Version = {{ printf "%q" .Version }}
@@ -78,13 +76,11 @@ func run() error {
urlToLicense := buildURLToLicenseMap(result)
err = tmp.Execute(f, struct {
Timestamp time.Time
URL string
Version string
LicenseIDs map[string]string
URLToLicense map[string]string
}{
Timestamp: time.Now(),
URL: url,
Version: result.Version,
LicenseIDs: licenseIDs,