-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: add types #35
feat: add types #35
Conversation
index.d.ts
Outdated
@@ -0,0 +1,7 @@ | |||
import { ApplicationFunction } from "probot/lib/types"; |
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.
I think this should work
import { ApplicationFunction } from "probot/lib/types"; | |
import { ApplicationFunction } from "probot"; |
Can you check it please?
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.
I tried that at first, but my IDE was saying: Module '"probot"' has no exported member 'ApplicationFunction'.ts(2305)
And When I checked probot's index.d.ts
there is only export for ApplicationFunctionOptions
but no ApplicationFunction
type.
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.
I think we need to update this line first in probot:
https://github.com/probot/probot/blob/bb068d9ae2407df8a07ffa64dc7d7fb8f01f097a/src/index.ts#L24
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.
Sure, I'll create PR.
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.
Already merged, thanks! Now you'll have to bump the minimum version of probot to ^12.1.4
adapter-github-actions/package.json
Line 34 in 8e1f0f8
"probot": "^11.0.6", |
Note there were some breaking changes in v12, I'm not sure if any of them affect this adapter:
https://github.com/probot/probot/releases/tag/v12.0.0
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.
Updated, it seems like these breaking changes doesn't affect adapter, but I found out that there is failing one unit test.
It fails here:
adapter-github-actions/test/index.test.js
Line 99 in 8e1f0f8
expect(output[2].startsWith('::error::{"error":"nope"}%0A{%0A')).toBe(true); |
With message:
expect(received).toBe(expected) // Object.is equality
Expected: true
Received: false
97 | process.stdout.write = origWrite;
98 |
> 99 | expect(output[2].startsWith('::error::{"error":"nope"}%0A{%0A')).toBe(true);
| ^
100 |
101 | expect(mock.activeMocks()).toStrictEqual([]);
102 | });
at Object.<anonymous> (test/index.test.js:99:70)
Is it possible that error message format had changed or am I missing something?
Resolves: probot#34
Děkuju Jan! |
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you for your work and this awesome tool! 👍 |
This should resolve #34
Please note, that this PR doesn't cover
ProbotExports
:adapter-github-actions/index.js
Lines 1 to 6 in 8e1f0f8