Comments (6)
NGitLab.Mock doesn't support webhooks. However, based on your needs, you can use the events on collections to detect when a change occurs (INotifyCollectionChanged
).
from ngitlab.
I'm not sure what it would take to support webhooks in tests. Feel free to share some ideas :)
from ngitlab.
The collection notifier is very close to what I need actually! If there was something like this to listen for the items in the collection to change, that would be immensely useful. So that I could listen for calls to, for instance, gitLab.Issues.EditAsync
; the collection notifier does allow listening for gitLab.Issues.CreateAsync
though!
I am unsure how that would look like in code but given some guidance I could look into making a PR!
from ngitlab.
Implementing something that would allow simulating webhooks is more complicated as webhooks, most of the time, has the previous and new values. So, you can't only rely on IPropertyChanged / INotifyCollectionChanged.
I forgot to mention the Server.ClientOperation
event that is raised for each method on a client. The event is currently empty, so you don't know which method is called, but we could add more data to it if needed.
from ngitlab.
What you mentioned about requiring the previous values definitely is true; we make lots of use of that to check in what ways the assignee or labels for example have changed to react to that accordingly.
Yeah, I saw Server.ClientOperation
but couldn't find much use in the empty args indeed. What information would go in there? The way it's currently being invoked makes it quite difficult to pass any result-y sort of thing because the scope is always created before any action happens.
from ngitlab.
Related Issues (20)
- IiDs of mocked merge requests are equal to the IDs HOT 1
- Recommended way to get Project Id HOT 2
- Single issue without project ID HOT 2
- Add due date to Issue create/edit models HOT 3
- Add suggested and actual approvers to MergeRequestApprovals
- Empty Commit HOT 3
- Subgroups api missing or not readily visible HOT 4
- PipelineClient supports Test Reports but not Test Reports Summaries
- Post the build status to a commit HOT 2
- Improve testing for Users client
- 414 Request URI Too Large when updating a single file in the repository HOT 2
- Support Project/Repository commits filter HOT 1
- Missing License Information In Nuget metadata HOT 2
- [Question] get related Issues for specific Issue. HOT 4
- ID needs to change to long or string HOT 3
- Add support for keyset pagination in RepositoryClient HOT 4
- A few endpoints missing? HOT 1
- Missing TimeStatsAsync for MergeRequests HOT 1
- Add ResourceEvents for merge requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngitlab.