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

action is not running on Pull Requests #10

Open
horacioh opened this issue Nov 24, 2019 · 1 comment
Open

action is not running on Pull Requests #10

horacioh opened this issue Nov 24, 2019 · 1 comment

Comments

@horacioh
Copy link

hey! 👋

I wanted to add this action to my workflow and seems that is not running and I know why. but first let me explain my workflow:

on pull_request:

  1. build the project on the staging environment (netlify)
  2. get the unique Build URL from the artifacts
  3. AFTER build, run webpagetest on the unique build URL
  4. run performance budgets
  5. print the results on the Pull request comments.

this actions is the part 3, but it only runs on push, not pull requests: see the if statement here

My suggestion:

  • remove the if statement: let the actions user decide when to run it
  • fix the comment creation: this seems to be broken. check the message I got:
    Screen Shot 2019-11-24 at 12 31 54 PM
  • maybe createCommitComment is not the right method but octokit.pulls.createComment ?
octokit.pulls.createComment({
  owner,
  repo,
  pull_number,
  body,
  commit_id,
  path
})

actually, now I'm thinking it would be nice to instead of removing the if statement, change it to a switch, so depending on where the user run it, it will do the appropiate octokit API calls.

I forked the repo and I'm doing testings myself. if I get any progress I will post it here! (and eventually submit a PR) :)

thanks!

@JCofman
Copy link
Owner

JCofman commented Nov 26, 2019

Hi 👋 @horacioh thx a lot I will take a look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants