Skip to content
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

jArchi pre-commit hook #183

Closed
wants to merge 11 commits into from

Conversation

dwinkler-oebb
Copy link

@dwinkler-oebb dwinkler-oebb commented Dec 13, 2021

Hi @Phillipus,

This pull request is a following up my question in archimatetool/archi-scripting-plugin#77 (comment)

Btw, I am planning to use this feature when a user publishes a Change via the "coArchi" Plugin to the git Repo. Is there some way of "event hook" for "before commit" or "after push" to hook into this workflow with a jArchi script?

Thanks in advance!

For realizing my envisioned Archi workflow it prepared this pull request since there is currently no integration of jArchi & coArchi.

This pull-request realizes the following:

Kind regards
Dominic

@Phillipus
Copy link
Member

Phillipus commented Dec 13, 2021

Thanks for putting in the effort for this PR (ideally it should be a draft PR)

We have to assume that not all coArchi users also use jArchi. Furthermore, coArchi and jArchi should know nothing of each other, so I see some problems with this and the other PR.

  1. Adding a reference to jArchi in coArchi's preference pane should not be done here
  2. Adding the callPreCommitScript method should not be done here

On the other PR (archimatetool/archi-scripting-plugin#100) the problems are:

  1. The cleanFolder(String path) method - this is a very specific method and we shouldn't add this here

What may be useful is the proposed jArchi RunScriptHandler command with some changes.

Ideally the way to do something like this is:

  1. Add a more generalised RunScriptHandler command in jArchi that can be called as you do it in callPreCommitScript. The parameter should be a full absolute path. The console should not be opened.
  2. Add an Eclipse extension point in coArchi for pre (and perhaps post) commit so that code such as callPreCommitScript can be called from the extension in a separate plug-in.
  3. In the extension plug-in, add the additional Preference pane option(s)

And another consideration is that this may be more suited to coArchi 2.

@Phillipus
Copy link
Member

@dwinkler-oebb I'll close this PR for the reasons in the comment above.

@Phillipus Phillipus closed this Jan 24, 2022
@dwinkler-oebb dwinkler-oebb deleted the jarchi-hooks branch January 14, 2023 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants