Closed dependabot[bot] closed 1 year ago
Merging #73 (72bdba0) into main (323424f) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## main #73 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 16 16
=========================================
Hits 16 16
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
This appears to have broken with permissions issue. Has the action changed the way it does the push to git?
This appears to have broken with permissions issue. Has the action changed the way it does the push to git?
Hi Giles,
The issue is not with the action itself but rather the permissions given to dependabot. Dependabot PRs are treated like PRs from forks and aren't given access to workflow secret
s. See: https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/
That's annoying, we need to exclude dependabot PRs in this statement then: https://github.com/DiamondLightSource/python3-pip-skeleton/blob/main/.github/workflows/docs.yml#L54
Is there a ${{ github.is_dependabot }}
or something similar?
There are three options,
Elevate the permissions of the action with:
jobs:
docs:
permissions:
contents: write
This opens up the possibility of a malicious change to one of the actions within ruining our repo, so I would recommend against this.
Skip if the the user is dependabot. This should work for now but will not solve the issue when it comes to forked PRs.
Skip if the user doesn't have write permission. (using an action like: https://github.com/marketplace/actions/check-user-permission). It's a bit more work, but the most "correct" solution
I vote for 2. The likelihood of dependabot updating something that subtly reformats the docs and someone spotting it are slim, so no point in pushing gh-pages anyway
With 2. if we have a legitimate user with incorrect permissions it will fail silently and cause confusion. I'm not sure how likely that is but I also find Tom's "if github.actor == 'dependabot[bot]'" more explicitly describes what we are doing.
EDIT: Ah OK forked PRs are still an issue so @garryod is right
I think I took too much acid before my previous post on this. Please ignore.
I've gone with 2. and bumped the actions-gh-pages manually in #79
OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version
or @dependabot ignore this minor version
. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore
condition with the desired update_types
to your config file.
If you change your mind, just re-open this PR and I'll resolve any conflicts on it.
Bumps peaceiris/actions-gh-pages from 3.8.0 to 3.9.0.
Release notes
Sourced from peaceiris/actions-gh-pages's releases.
Changelog
Sourced from peaceiris/actions-gh-pages's changelog.
... (truncated)
Commits
de7ea6f
chore(release): 3.9.01bf4b35
chore(release): Add build assets44a2b44
feat: bump node12 to node16 (#791)2bef62f
ci: use actions-github-app-token2c04d6b
ci: bump peaceiris/workflows from 0.16.0 to 0.17.1 (#789)f2ac8b6
chore: fix year402af2b
chore: add duplicatee1448a7
docs: bump hugo-version to 0.101.0 (#779)2eea5d7
ci: drop ubuntu-18.04, add 22.04, latest (#776)765cf11
docs: add note GitHub official ActionDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)