Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix automated PRs manager workflow #1489

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/automated-prs-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ jobs:

# list prs that are less than 24h old and exclude prs from forks

prs=$(
dependabot_prs=$(
gh pr list \
--author 'dependabot[bot]' \
--json url,createdAt,headRefName,headRepository,headRepositoryOwner \
-q '.[] | select((.createdAt | fromdateiso8601 > now - 24*60*60) and .headRepositoryOwner.login == "replicatedhq" and .headRepository.name == "troubleshoot")'
)

prs=$(echo "$dependabot_prs" | jq -sc '. | unique')
echo "prs=$prs" >> "$GITHUB_OUTPUT"

process-prs:
Expand Down
52 changes: 25 additions & 27 deletions pkg/collect/certificates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,23 @@ vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
+OkuE6N36B9K
-----END CERTIFICATE-----`,
"validCert": `-----BEGIN CERTIFICATE-----
MIIDejCCAmKgAwIBAgIEAZaq0DANBgkqhkiG9w0BAQsFADAuMRgwFgYDVQQDEw9Q
cm9qZWN0IENvbnRvdXIxEjAQBgNVBAUTCTYxNTkyOTg5MTAeFw0yMzAyMjQwNDI3
MThaFw0yNDAyMjUwNDI3MTZaMBAxDjAMBgNVBAMTBWVudm95MIIBIjANBgkqhkiG
9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqsNmmxb1ICso6Ay25lapcRyvLxAX/5u422uV
eiNn5jseCVXfg1jJr2Symr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MMDUV4YW1wbGVTZXJ2ZXIwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCsb9MSNERE7l4b/vxzkRnL6qvkjodbY3yQ
DDCbG29jJ71wSwYoz0v4n/Q/tDaJDBUcSjSPIa+L6Gn1BGLNUD2LFec5H5XlwcDq
A0D8qzvPLMYaIw4p04M/2Wvkqme79yQta8jXaCnPxTkgysno/FuQR+nDMqXoyW01
wMmj8JAYFs9MVPbmP97RqbVHnn7cydzvQvi4+dfBuII9L+TvTQY2o42bbCqCcmov
16m0uXp98j4CFfv/8KhCmQcqS0uyvp+J/iJZzEow+1NP72pozPEPv9JhXsYDb+vH
KxX5k44fYXVYVQHxYQllLjDDRcbz2DJh2DQXMZTiTLE63tC0m2RjAgMBAAGjVDBS
MDEGA1UdEQQqMCiCCGV4YW1wbGUxgghleGFtcGxlMoIIZXhhbXBsZTOCCGV4YW1w
bGU0MB0GA1UdDgQWBBTEkowqyNS1ez5XJ0shro/18UQlqTANBgkqhkiG9w0BAQsF
AAOCAQEANhnxV81NZmt8FcgrcRt73WdKDCE0hQbci65ZkAbcTVOCAs6Rw+aEC04L
0gKJT4Zmx3kR3fUwcDQRhjoXIrhmvP59k/8SN0N+Ua50oEYikaetsxEDr8oikwP2
eHDKU451jZZfcyII2Jx8XjgtiExcNZL3N9ZtSstp3I9n9BSmMdQHDIvPxNeGdJri
l4YGTm+sJLs+c5efSNaEPw1Dr6bhAPamNQwvIspuASJlCTcMCLw2+F3dEolAFUuM
E5wI9498c+P3pvl85UfiQISTu95jOl7YmZOYl8xBpu9yhQ7kjWhVRdVAnhl9Ts9F
3TD68rCMXegJYyg5VbiwVdSPkcw3eQ==
-----END CERTIFICATE-----`,
"nonCert": `-----BEGIN CERTIFICATE-----
Oy1is0whDArLNwIDAQABo4G9MIG6
Expand Down Expand Up @@ -248,16 +246,16 @@ func TestCertParser(t *testing.T) {
CertificateChain: []ParsedCertificate{
{
CertName: "tls.crt",
Subject: "CN=envoy",
Subject: "CN=ExampleServer",
SubjectAlternativeNames: []string{
"envoy",
"envoy.projectcontour",
"envoy.projectcontour.svc",
"envoy.projectcontour.svc.cluster.local",
"example1",
"example2",
"example3",
"example4",
},
Issuer: "SERIALNUMBER=615929891,CN=Project Contour",
NotAfter: time.Date(2024, time.February, 25, 4, 27, 16, 0, time.UTC),
NotBefore: time.Date(2023, time.February, 24, 4, 27, 18, 0, time.UTC),
Issuer: "CN=ExampleServer",
NotAfter: time.Date(2029, time.February, 24, 22, 9, 27, 0, time.UTC),
NotBefore: time.Date(2024, time.February, 26, 22, 9, 27, 0, time.UTC),
IsValid: true,
IsCA: false,
},
Expand Down
16 changes: 8 additions & 8 deletions pkg/collect/host_certificates_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ func Test_HostCertParser(t *testing.T) {
CertificatePath: path,
CertificateChain: []ParsedCertificate{
{
Subject: "CN=envoy",
Subject: "CN=ExampleServer",
SubjectAlternativeNames: []string{
"envoy",
"envoy.projectcontour",
"envoy.projectcontour.svc",
"envoy.projectcontour.svc.cluster.local",
"example1",
"example2",
"example3",
"example4",
},
Issuer: "SERIALNUMBER=615929891,CN=Project Contour",
NotAfter: time.Date(2024, time.February, 25, 4, 27, 16, 0, time.UTC),
NotBefore: time.Date(2023, time.February, 24, 4, 27, 18, 0, time.UTC),
Issuer: "CN=ExampleServer",
NotAfter: time.Date(2029, time.February, 24, 22, 9, 27, 0, time.UTC),
NotBefore: time.Date(2024, time.February, 26, 22, 9, 27, 0, time.UTC),
IsValid: true,
IsCA: false,
},
Expand Down
Loading