Open ensemblebd opened 2 months ago
Hello @ensemblebd.
We are happy that you tried to contribute to our project by enhancing the integration for Github.
After we review changes that you have made within our codebase, we'll give you feedback.
All the best.
Implemented clockify small-button for GitHub's Project-perspective:
Which by inference means it also now supports non-Issue tasks (GitHub's Project-pespective allows creation of tasks that are not tied to real GitHub Issues). Also have code that enables pushing Labels from said tasks/issues, which works if Clockify already contains the associated Tag.
Let me know if any issues to help this PR along. I believe my code on line 33 might be one area of improvement. Am using a hard internal to access the local storage of the extension, to procure the list of projects - for loose comparison to the Github Project view's Project-Name. This is because on project view, there is no other reference to the Repository, anywhere. And React internals (__reactRoot$*) are not possible to attain.
The only "volatile" change I believe is on line 125/126, which is now processed instead on line 115. I don't believe it's possible that this negatively impacts backwards compatibility. And additionally, it relies on the github html output to retain the class names for "test-id". I see no other way to reliably select the dom elements. But humbly request your review to verify.
In short:
ScopedSingleton_GitHubProjectView
, for code-reusability purposes.h1
tag in the Project view. If present, it loosely matches against thelocalStorage
of the plugin's known projects.Appreciate your feedback. My company just purchased Clockify, and we look forward to using it extensively within GitHub's Project-perspective. But we need Clockify to work on non-issue tasks. Creating a GitHub issue for every task simply to project it into Clockify adds extreme clutter for us. And this solves that, and additionally gives users ability to initiate Clockify on GitHub Project-perspective views.
Thank you!
KanBan View
Table View
Initiation proof of concept, pulling both "repo" / "project" and Task title.