-
Notifications
You must be signed in to change notification settings - Fork 48
Fire source control hooks when creating/opening/editing/deleting projects #1313
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
Fire source control hooks when creating/opening/editing/deleting projects #1313
Conversation
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.
Looks good as code, with only one minor comment made. I haven't tested it but I think the person who raised the issue is better placed to do that.
Thanks for the review @gjsjohnmurray! I've added your suggestion as well as a few more changes. |
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.
LGTM but not tested
Hi @isc-bsaviano we have always wanted the exposure of the current project opened for the current document to be passed to VSC studio Source Control hooks. Sounds like this might do the trick. |
@trevorfstrong I just re-read your request and I think it may be unrelated to this PR. This PR fires OtherStudioActions for .PRJ files. Is that what you're asking for, or do you mean something else? |
Specifically, what we do is ensure someone that is checking out a document on the server, e.g. CLS, INT has it associated with the studio (VSC) project currently opened. Then when they check in the file, our Source Control system utilizes that project to control workflow patterns. It may be a separate issue that you can't handle but this is the code in the hooks. |
@trevorfstrong Something like that is going to be very difficult to implement in VS Code. VS Code doesn't really "open" projects, it just treats them as a SQL table that defines a group of documents. Since users can have multiple projects "open" at once (via the multi-root workspace feature) and REST connections can go through a number of CSP jobs, there isn't a good way to persist that information on the server. |
I understand. It would be possible to pass the project with the REST requests somehow and "open" it for the duration that the request is processed so any source control hooks see it. That would require a bunch of IRIS-side changes though. I would need to discuss that internally before drawing up a spec or committing to doing that work. |
Thanks for your attention on this subject Brett. |
Thanks for bringing this to my attention! I will add this to my notes for when we have a larger discussion about projects support in VS Code. |
Hi Brett. |
Hi again. |
@trevorfstrong I think that what we have now is the best I can do. Makign this work closer to Studio would require a major server change to support "opening"/"closing" projects on every request, or spamming the |
This PR fixes #1312
I think this is the best I can do with "other" actions to approximate what happens when a file is opened via the Atelier GET /doc/ API. @gjsjohnmurray I'd really appreciate your review on this since since you're a server-side source control expert.