Immutable solution version
GitHub webhook not refreshing ApplicationSets on branches with slashes
Complete solution
Shows how to fix gitHub webhook not refreshing ApplicationSets on branches with slashes. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Maintainer rumstead's workaround, verified by reporter pre: in your git generator, use the fully qualified ref, refs/heads/env/dev for branches or refs/tags/v3.14.1 for tags, instead of the short name. Reporter-confirmed root cause and workaround.
Steps
- Reporter-confirmed root cause and workaround. GitHub sends the full branch ref (refs/heads/env/dev) in the webhook payload, and the ApplicationSet webhook handler misparses refs containing a slash, so the refresh never matches. Maintainer rumstead's workaround, verified by reporter pre: in your git generator, use the fully qualified ref, refs/heads/env/dev for branches or refs/tags/v3.14.1 for tags, instead of the short name. With the qualified ref the webhook matches and refreshes correctly. The underlying parsing bug has a PR upstream, but the qualified-ref form works today.
When to use
You are seeing this: Issue argoproj/argo-cd#15427 (closed, 49 comments): GitHub webhooks stop refreshing ApplicationSets when the tracked branch or tag contains a slash, e.g. env/dev. Use this skill when you run into "GitHub webhook not refreshing ApplicationSets on branches with slashes".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: refstags v3.14.1. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
In the GitHub issue gh:argoproj/argo-cd#15427 (https://github.com/argoproj/argo-cd/issues/15427), the problem reported was: Issue argoproj/argo-cd#15427 (closed, 49 comments): GitHub webhooks stop refreshing ApplicationSets when the tracked branch or tag contains a slash, e.g. env/dev. Pushes to main refresh fine, but pushes to env/dev never trigger a refresh, even though the webhook is delivered. The verified resolution was: Reporter-confirmed root cause and workaround. GitHub sends the full branch ref (refs/heads/env/dev) in the webhook payload, and the ApplicationSet webhook handler misparses refs containing a slash, so the refresh never matches. Maintainer rumstead's workaround, verified by reporter pre: in your git generator, use the fully qualified ref, refs/heads/env/dev for branches or refs/tags/v3.14.1 for tags, instead of the short name. With the qualified ref the webhook matches and refreshes correctly. The underlying parsing bug has a PR upstream, but the qualified-ref form works today.
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_KuQFTucrOdNGgN0gOSYjOA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">GitHub webhook not refreshing ApplicationSets on branches with slashes <span>— Vectle</span></a>