Skip to content

Script to respond to comments in PRs #279

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

Merged
merged 3 commits into from
Apr 7, 2020
Merged

Conversation

mfalt
Copy link
Member

@mfalt mfalt commented Mar 31, 2020

Checks any comments on PRs for the string @JuliaControlBot test-plots and if the user is an admin, then pings ControlExamplePlots.jl to do tests and respond with a comment.

See corresponding script here: https://github.com/mfalt/ControlSystems.jl/blob/master/.github/workflows/CommentResponder.yml
which is triggered here:
mfalt#3

@coveralls
Copy link

coveralls commented Mar 31, 2020

Coverage Status

Coverage increased (+0.07%) to 55.662% when pulling 25c34c0 on mfalt:comment-test into fe4e627 on JuliaControl:master.

@mfalt
Copy link
Member Author

mfalt commented Apr 2, 2020

I think this should be ready now @baggepinnen , updated the existing script to not report failure when the PR is created from a fork. In that case the script would previously fail because it is "dangerous" to let forks access to the login for the JuliaControlBot. Now instead of failing it skips the step. We can use the feature in this PR of commenting on PRs from forks instead to run the script "manually".

curl -X POST https://api.github.com/repos/JuliaControl/ControlExamplePlots.jl/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.ACCESS_TOKEN_BOT }} \
--data '{"event_type": "prupdate", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'", "pr_number": ${{ github.event.number }} }}'
fi
env:
SECRET: ${{ secrets.ACCESS_TOKEN_BOT }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to avoid weird issue of environment variables not being directly available in if statements.

@mfalt
Copy link
Member Author

mfalt commented Apr 6, 2020

Aby objections to pulling this @baggepinnen ?

@baggepinnen
Copy link
Member

Go ahead

@mfalt mfalt merged commit 77822c2 into JuliaControl:master Apr 7, 2020
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

Successfully merging this pull request may close these issues.

3 participants