-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add Hub #36
Comments
👋 Thanks for the suggestion! Are there specific hub commands that you're looking for? The extended git ones seem to be covered by having git installed, but some of the new commands offered by hub seem interesting. Does actions/github-script offer the functionality you're looking for? Duplicate of #1 |
@kaylangan I'm specifically looking for The idea is to have an action on repo A build a project and programmatically create a pull request with artifact changes to repo B, where repo B has its own GH Action that triggers on |
@kaylangan I'm looking for hub api repos/{owner}/{project}/issues/{issue}/comments so that I can post a comment to a Pull Request during an action. Currently i'm manually downloading 2.12.8 in my Action steps. |
You can also use the built-in GITHUB_TOKEN secret to directly talk to the API with a tool such as curl to achieve this, just add a step like:
This would remove the necessity to manually download Hub and save time on your build. |
As a follow up, if you have text that is not json friendly, you can use JQ to create a JSON document. then do -d @comment.json in curl. I'm posting the output from terraform show to the pull request. |
There's no github action that allows to do something as simple as this:
Being able to do it without having to install hub each time would be awesome. |
I'm not quite sure how the create-release action would not allow you to do that? |
no offense but the create-release action is a joke. the snippet I pasted tags the just pushed commit using the current timestamp (20191206.1, 20191206.2, 20191207.1...), creates a release and attaches the first zip match as release asset. there's no easy, straightforward way to accomplish that, not even using a combination of several "official" actions. no official actions:
create-release:
upload-release-asset:
honestly, the "official" actions are very limited, they are just plain REST API wrappers over YAML syntax, inconvenient and with no extensibility in mind. |
For reference. #1 (comment)
wget -nv -O- \
https://github.com/github/hub/releases/download/v2.12.7/hub-linux-amd64-2.12.7.tgz | \
tar xz --strip-components=1 '*/bin/hub' |
Added official instructions on how to download and use hub from within GitHub Actions I wouldn't mind if hub was already bundled within the virtual environment, though! |
Thank you! |
Hub CLI has been added to building process of Ubuntu 16/18, MacOS, Windows images. After deployment you can use this utility in your builds. |
Verified it works. Thanks all! |
Tool information
Virtual environments affected
Can this tool be installed during the build?
Yes, can be downloaded and installed from the github page
Are you willing to submit a PR?
Yes
The text was updated successfully, but these errors were encountered: