Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: Check PR Author Instead of Action Actor #112

Closed
jackson-miller-tbol opened this issue Nov 11, 2021 · 2 comments · Fixed by #137
Closed

Request: Check PR Author Instead of Action Actor #112

jackson-miller-tbol opened this issue Nov 11, 2021 · 2 comments · Fixed by #137
Labels
bug Something isn't working

Comments

@jackson-miller-tbol
Copy link

// Don't bother hitting the API if the event actor isn't Dependabot
if (context.actor !== DEPENDABOT_LOGIN) {
core.debug(`Event actor '${context.actor}' is not Dependabot.`)
return false
}

The above code seems to check whether or not the Actions actor is Dependabot and avoids calling the API if the actor isn't Dependabot. Can we consider checking the PR author instead of/in addition to the actor? The reason I ask for this is that there are times where I need to re-run the action and I don't want to have to get dependabot to recreate the PR via @dependabot recreate, since that takes more time.

The author is available in the PR event data and I'm able to access it in actions yml using github.event.pull_request.user.login

Happy to open a PR for this if desired

@jackson-miller-tbol jackson-miller-tbol added the enhancement New feature or request label Nov 11, 2021
@djurre
Copy link

djurre commented Jan 17, 2022

I'm running into this as well, I think it's more logical to just look at the PR author.

@jackson-miller-tbol Have you looked into this any further yet?

@mwaddell
Copy link
Contributor

mwaddell commented Feb 7, 2022

I'm running into this as well - pushing changes to the branch triggers the actions to rerun, but since I pushed the changes, I'm the actor instead of dependabot.

Getting the error message PR is not from Dependabot, nothing to do. doesn't really make sense when the PR is from dependabot...

mwaddell added a commit to pangaeatech/fetch-metadata that referenced this issue Feb 7, 2022
mwaddell added a commit to pangaeatech/fetch-metadata that referenced this issue Feb 7, 2022
mwaddell added a commit to pangaeatech/fetch-metadata that referenced this issue Feb 7, 2022
@Nishnha Nishnha added bug Something isn't working and removed enhancement New feature or request labels Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants