-
Notifications
You must be signed in to change notification settings - Fork 83
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
Prompts for inputs even when Arguments are passed #111
Comments
@datsabk can you write a failing test for the scenario you're running into? Please note that the default username and email comes from the machine's |
Hello @joeyguerra , my command looks like What's happening currently is that all prompts seem to be pushed regardless of whether a default value is passed. I couldnt find the source of this.prompt() function that pushes the prompt. Does it filter in any way? |
Update: I think you have to call it like I see. I'm no longer making feature requests to this package because the current recommended way to generate a Hubot instance is as documented in the Hubot repo readme. Would you mind trying that instead? But I haven't added the ability to set the owner properties via cli arguments. You would just update the npx hubot --create myhubot --adapter @hubot-friends/hubot-slack Where |
@joeyguerra I have the same issue with prompts for inputs even when arguments are passed. As a result, my image build broke :( |
@hontarenko are you able to update your image with the new recommended way? |
@joeyguerra Сan you provide an example of Dockerfile with recommended installation way hubot-slack? |
@hontarenko what mage are you currently using? What command do you run? |
|
🎉 This issue has been resolved in version 2.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@hontarenko I pushed a fix for the issue. Please update your Dockerfile to install the latest Please note that I'm no longer maintaining this template. I recommend using |
If you're interested in using the latest version of Hubot and the new hubot-slack adapter that works with the latest version of Hubot, here's an updated Note: You'll need to create a new Slack app (you might be able to use your existing) and a Slack Bot Token. Here's the doc for it: https://github.com/hubot-friends/hubot-slack
|
@joeyguerra With latest version generator-hubot, i am getting an error:
|
@hontarenko I think that error is caused by using the latest version of Hubot (which is installed by the yeoman Hubot generator) and the old Slack Adapter (which is incompatible with the latest version of Hubot). I think your options are to downgrade Hubot and all of the default Hubot scripts or update to the compatible Slack Adapter (which requires you to get a Slack app token AND a Slack Bot Token https://github.com/hubot-friends/hubot-slack). I think you can downgrade Hubot and it's default scripts with the following: In your original version Dockerfile:
Looking forward to hearing what path you take. |
@joeyguerra With downgraded versions i got dependency conflict: And if using |
Ok. Can you please try installing it:
|
@joeyguerra I got the same errors |
I think trouble in this function https://github.com/hubotio/hubot/blob/main/src/Robot.mjs#L520-L522 |
|
That error suggests that Hubot version 4 is not being installed. The of the code you posted is in the newer versions of Hubot. |
The following FROM node:20.12
ARG GITHUB_TOKEN
ARG HUBOT_SLACK_TOKEN
ENV GITHUB_TOKEN="${GITHUB_TOKEN}" \
HUBOT_SLACK_TOKEN="${HUBOT_SLACK_TOKEN}"
RUN npm i -g yo generator-hubot && \
addgroup hubot && \
adduser --disabled-password --gecos '' --ingroup hubot hubot && \
adduser hubot hubot
USER hubot
WORKDIR /home/hubot
RUN yo hubot --owner="test" \
--name="HuBot" \
--description="HuBot for github actions" \
--defaults
RUN npm i axios@1.6.8 hubot@4 hubot-slack
RUN npm i hubot-redis-brain@2 hubot-diagnostics@1 coffeescript@1 --force
RUN rm scripts/Example.mjs
COPY trigger-workflow.js scripts/
CMD ["npm", "start", "--", "--adapter", "slack", "--name", "HuBot"] |
Thanks! Problem solved :) |
You're welcome. I'm curious, care to share what you're using Hubot for? Is it valuable? |
We are using Hubot for triggering github actions workflows with different parameters |
@hontarenko What makes it more attractive than just using the Github Actions UI? |
Because I use slack integration with github to run github actions workflows from slack commands. Such a business need |
Hello @joeyguerra ,
After your recent changes, the conditional prompts got converted to permanent prompts.
This is how the prompts are expected to be. Instead, it now pushes all prompts even if options are passed. Could you please look into fixing the same.
The text was updated successfully, but these errors were encountered: