RobotStudio event

Addin: Github integration [0.1]

Options
Tompanhuhu
Tompanhuhu ✭✭
edited January 17 in RobotApps

This add-in is tested by me, but it may contain bugs.

If you're working on a virtual station, please save your station before doing actions with this add-in.
There might be edge-cases I haven't tested that makes robotstudio crash.
Make sure to save your station!
I have not had this issue with real-controllers. 

Description:

Adds GitHub version control to robotstudio.

Only robotsystem is handled, not robotstudio stations. 

This add-in works with both real and virtual controllers. But loading times may be longer when working with real controller because the add-in is generating backups.  

Current features:

Links robotsystem with a repository, if no repository exist one will be created.
Repository's will be named after robotsystem. 
If the robotsystem is virtual a prefix with computername will be added.
Real controller: 1600-111222
Virtual controller: DESKTOP-AA11BBB_1600-111222
All repository's created with this add-in will be private. 

Commit system to repository, a backup will be created and all files will be staged and 
commited to the repository. 
A messagebox will popup asking for a commit message. 
After successful commit the GitHub repository website will open. 


Compare robotsystem with latest commit, changes will be outputed in the output window.



Compare current modules (not commited) with previous commits
Changes are highlighted.

How to install:

Download rspak file, open Add-ins tab in robotstudio. Click Install and select package.

https://github.com/JETomi/TwRobotStudioGitHub/releases/tag/release

Open Add-ins tab in robotstudio.

Right-click Tw GitHub integration in the left panel.

Select load add-in.

If you want add-in to start automatically when robotstudio starts, select Autoload add-in.

How to use:


Before using the add-in a personal access token (Classic) must be generated from GitHub settings page.

More information at this page: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic

(Required) Enter your generated token in the add-in menu "Set GitHub token". 

(Optional) Author name is the name displayed as author to commits. Default name is windows login name. 

(Optional) With author email it's possible to link your personal GitHub account as author.

These features make it possible to collaborate with multiple people using the same access token, even when the repositories are created as private. 

Latest available version:

0.1

How to ask for support / feedback:

Write a post in this thread.

Please write feedback if the add-in is stable for you.

Sourcecode:

https://github.com/JETomi/TwRobotStudioGitHub

Systemintegrator - Web / C# / Rapid / Robotstudio

If I helped, please press Vote Up  :smile:
Post edited by Tompanhuhu on

Comments

  • lemster68
    Options
    I am guessing that the Robotstudio connection will be over a network, and consequentially, the option PC interface is required.  Also, is is possible to have sequential backups or does it only keep one, overwriting with the most recent?
    Lee Justice
  • Tompanhuhu
    Options
    It's an robotstudio addin so basically it free rides on robotstudio's connection to the robotcontroller.
    AFAIK even if using the free-tier of robotstudio. 

    So basically same connection rules as robotstudio, if you don't got PC interface connection must be made with service-port.

    Git tracks changes in code, always stores all changes made with history. So it's easy to see what has changed and revert back if needed. 

    Internet connection is needed to upload backup to Github yes.
    I'm thinking about making it more local but Github gives alot of GUI features for free.
    Otherwise alot more GUI has to be programmed in this addin to handle and browse commits, restore old version and so on. Maybe in the future or if someone want's to contribute. 
    Systemintegrator - Web / C# / Rapid / Robotstudio

    If I helped, please press Vote Up  :smile:
  • This is great! Thank You. It seems to work well for me when using GitHub as the hosting location but when generating a token from a different hosting site (Copia) it fails. Are you able to make the source code for your plug-in available? 
  • Tompanhuhu
    Options
    This is great! Thank You. It seems to work well for me when using GitHub as the hosting location but when generating a token from a different hosting site (Copia) it fails. Are you able to make the source code for your plug-in available? 
    Thanks for the feedback! Great to hear it's working for you. 

    The add-in uses libgit2sharp to handle local repositories.
    It then uses octokit to push it to github. 
    I don't know if there is a similar library for Copia.
    https://github.com/octokit/octokit.net
    https://github.com/libgit2/libgit2sharp


    Sourcecode is available here:
    https://github.com/JETomi/TwRobotStudioGitHub
    Systemintegrator - Web / C# / Rapid / Robotstudio

    If I helped, please press Vote Up  :smile: