From fe70a10664927d58e416771798cf81543d56c783 Mon Sep 17 00:00:00 2001 From: Mzack9999 Date: Wed, 20 May 2026 21:16:47 +0200 Subject: [PATCH] fix memogen context skip and scope workflow to upstream repo --- .github/workflows/memogen.yaml | 2 +- cmd/memogen/function.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/memogen.yaml b/.github/workflows/memogen.yaml index a2fafb91a1..8ba9a83294 100644 --- a/.github/workflows/memogen.yaml +++ b/.github/workflows/memogen.yaml @@ -11,7 +11,7 @@ on: jobs: memogen: - if: ${{ !endsWith(github.actor, '[bot]') }} + if: ${{ github.repository == 'projectdiscovery/nuclei' && !endsWith(github.actor, '[bot]') }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 diff --git a/cmd/memogen/function.tpl b/cmd/memogen/function.tpl index 279b9f11a7..da7b36f2d0 100644 --- a/cmd/memogen/function.tpl +++ b/cmd/memogen/function.tpl @@ -11,7 +11,7 @@ import ( {{range .Functions}} {{ .SignatureWithPrefix "memoized" }} { - hash := "{{ .Name }}" {{range .Params}}{{if ne .Type "&{context Context}"}} + ":" + fmt.Sprint({{.Name}}){{end}}{{end}} + hash := "{{ .Name }}" {{range .Params}}{{if ne .Type "context.Context"}} + ":" + fmt.Sprint({{.Name}}){{end}}{{end}} v, err, _ := protocolstate.Memoizer.Do(hash, func() (interface{}, error) { return {{.Name}}({{.ParamsNames}})