nwtgck / actions-comment-run Goto Github PK
View Code? Open in Web Editor NEWExecute any script in a GitHub issue comment
License: MIT License
Execute any script in a GitHub issue comment
License: MIT License
I am trying to make this app run from a React.js project where the code can be a simple message like this bot
Hey @nwtgck , I'm trying to fix #263 on my fork branch and I've made the change to main.ts, but I can't figure out how to regenerate the dist/index.js file:
tsc
outputs multiple files (one per source .ts
file) to the lib
directory, but when I diff the outputted lib/main.js
with the existing dist/index.js
I get vast differencestsc --outFile dist/index.js
throws Only 'amd' and 'system' modules are supported alongside --outFile.
(because the tsconfig.json
specifies commonjs
modules). Switching to either amd
or system
module types throws other errors.How can I regenerate the dist/index.js
file?
It will be cool if we can have multiple workflow files equipped with comment runner, but have different setups (e.g., one with all the dependencies and services installed to run an app and other with minimal code when certain commands do not requite a full-fledged setup). Then configure each workflow to be invoked with different catch phrases.
One way to implement it would be to change hard-coded @github-actions run
catch phrase into an input variable with the existing value as the default. This way, the system will continue to function as it does, but advanced users can configure it to trigger different workflows with custom catch phrases.
This is a feature request.
First of all, this tool is really cool, I can't help to start using it in my daily job(well, actually I do most of my work on our company's self-hosted GitLab, so I wish there was a GitLab port of actions-comment-run
, but that's another thread then).
As a potential user of actions-comment-run
, I think if there are some variables( representing the current issue/pr/project/user who invoke the bot,) available in the execution context, it would benefits a lot.
I was wondering where you were getting the random LGTM gifs from, and I'm getting security warnings from my browser when trying to access http://LGTM.in/g.
Is this normal? I've pushed through, but the site seems empty? Is it broken?
Hey @nwtgck , thanks for building this awesome action! Your solution using comment-run with saved replies looks like it will very elegantly solve the "using secrets in untrusted PRs" problem, but there's one hitch - when the repo is inside an org, Github seems to have a bug where "Owner" members of an org don't receive the "OWNER" comment association. Given how sensitive secrets are, we can't use CONTRIBUTOR and to make the Owners COLLABORATORS would be a downgrade of permissions.
I've little faith Github will actually address the issue, so would it be possible to have an allowed-users
config to comment-run that whitelists users independent of their CommentAuthorAssociation?
Thanks again for a very cool action!
Kevin
You need to remove githubClient from the https://github.com/nwtgck/actions-comment-run#pr-merge-preview example since it's not an available variable https://github.com/nwtgck/actions-comment-run#available-variables-in-the-js-comment-context
How about addding an option to post eval result and stdout/stderr result as comments?
For example, how about adding -comment
flag? It should be useful especially for non-js code because it's not easy to post comments to GitHub.
@github-actions run -comment
#!/bin/sh
go get github.com/erning/gorun
#!/home/runner/go/bin/gorun
package main
import "fmt"
func main() {
fmt.Println("hello, world")
}
AFAICT after testing https://github.com/nwtgck/actions-comment-run#pr-merge-preview it creates a local branch actions-merge-preview/... with the proposed third party change.
But I was expecting it go one step further, create the pull request and run the CI / Github action, like I manually did here: kaihendry/dabase.com#9
The goal here is to streamline the review of the change. I'm a little worried if the third party (original) PR is updated, kaihendry/dabase.com#8 then would the PR 9 get subsequently updated too? I think it will, though it would require another PR merge preview action wouldn't it?
I'm trying a couple of examples upon:
kaihendry/dabase.com#7
And I'm getting as you can see upon
https://github.com/kaihendry/dabase.com/actions/runs/68702196
await is only valid in async function
error.
I think it's because:
mkdir -p .github/workflows/ && cd .github/workflows/ && wget https://gist.githubusercontent.com/nwtgck/a9b291f6869db42ecc3d9e30d0a0494c/raw/comment-run.yml
Which is v1 not v1.1
Hello, thanks for sharing this Action with the community.
I am testing it out in my personal repo here: bdougie/bot-test-repo#413
I can get the simple hello world to work, but when trying to use the examples with githubClient
it does not print a comment. It only acknowledges the Action completed with a reaction.
Any chance you could help me understand how to debug this?
Aside: Even after reading the code, it is not clear why the ๐ is added as a reaction. I understand the ๐ to be a signal the Action completed.
Stop comment-run by :-1:
reaction
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.