-
Notifications
You must be signed in to change notification settings - Fork 163
fix: require a custom 'api' url to send to instead of absolute urls as a 'method' #420
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #420 +/- ##
=======================================
Coverage 99.85% 99.85%
=======================================
Files 7 7
Lines 702 703 +1
=======================================
+ Hits 701 702 +1
Misses 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me 💯
But any chance we could add a unit test that ensures the override configuration sends a request to the correct uri?
I looked through the test but did not find such a test, but maybe I missed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call @WilliamBergamin - I agree, a test would be great. Otherwise, looks good! 👌🏻
@WilliamBergamin @mwbrooks Thank y'all both for the reviews 🙏 These tests were stumping me for a bit longer than I'd like to admit but related work in an adjacent repo brought some great inspiration 😉
This doesn't seem simple without catching actual HTTP requests, but we now test that the expected arguments are used in both the For now I'm hoping this is alright with the upstream tests we also have: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 💯
Summary
This PR requires using a custom
api
URL in step inputs to send to URLs that are not "https://slack.com/api/".Fixes unexpected behaviors noted in slackapi/node-slack-sdk#2176 for steps using a variable
method
for cases of composite action workflows or of variable inputs from outputs of a different step.No change to functionalities when using as a standalone step!
Preview
The format shown in the
README.md
is now required to send to a customapi
URL:Requirements