-
Notifications
You must be signed in to change notification settings - Fork 116
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
I am currently running dependabot-script in a private GHE instance to generate pull requests for my projects
I would like to leverage this project but this check :
fetch-metadata/src/dependabot/verified_commits.ts
Lines 22 to 44 in 29dc6db
| // Don't bother hitting the API if the PR author isn't Dependabot | |
| if (pr.user.login !== DEPENDABOT_LOGIN) { | |
| core.debug(`PR author '${pr.user.login}' is not Dependabot.`) | |
| return false | |
| } | |
| core.debug('Verifying the Pull Request contents are from Dependabot') | |
| const { data: commits } = await client.rest.pulls.listCommits({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: pr.number | |
| }) | |
| const { commit, author } = commits[0] | |
| if (author?.login !== DEPENDABOT_LOGIN) { | |
| // TODO: Promote to setFailed | |
| core.warning( | |
| 'It looks like this PR was not created by Dependabot, refusing to proceed.' | |
| ) | |
| return false | |
| } |
Expects the sender of the PR to be 'dependabot[bot]' when that's not possible within my context
Would you be open to adding an optional configuration parameter to the action to allow customizing this value?
As a side note, most Action examples suggest this as an optimization :
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
I am willing to send a PR with the same
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request