Closed thekaveman closed 4 months ago
This PR does not seem to contain any modification to coverable code.
Preview url: https://benefits-2091--cal-itp-previews.netlify.app
Preview url: https://benefits-2091--cal-itp-previews.netlify.app
It works!
Just to make sure I understand, it was broken specifically for dependabot PRs right?
Yes this fix is related to Dependabot PRs.
There was a separate issue with Dependabot PRs not having access to the secrets (because there is a separate set of secrets specifically for Dependabot): https://github.com/cal-itp/benefits/pull/2087#pullrequestreview-2055535958
Once I fixed that, this issue came up where the workflow couldn't add the preview URL comment, and it was because of this missing permission: https://github.com/cal-itp/benefits/actions/runs/9070328822/job/24952931531#step:8:31
I think the GITHUB_TOKEN
for Dependabot PRs is more limited by default: https://github.com/dependabot/dependabot-core/issues/3253#issuecomment-852541544.
For example we had a docs update back in April and the preview URL comment was added successfully: https://github.com/cal-itp/benefits/pull/2020#issuecomment-2050549616
I think the
GITHUB_TOKEN
for Dependabot PRs is more limited by default: dependabot/dependabot-core#3253 (comment).For example we had a docs update back in April and the preview URL comment was added successfully: #2020 (comment)
Makes sense! I thought I had seen it work before, so this would explain the difference. Thanks 🙏
This permission is needed to allow the step that adds a comment with the preview URL