I'm thinking about putting code on Github and using this library and my Quarts library (via a nice looking GUI and an icon in the notification area) to do everything for me synchronisation wise (which could be a bad idea). I'm not sure how many B4X developers use/upload their code to Github, but if there's a good few, and if they are interested, I might release this library.
I have a couple of issues that I still need to resolve, but so far so good. Whenever I get the chance to do so, I'll continue working on this library, but paid work comes first.
SS_JGit
Author: Peter Simpson
Version: 1.0
I have a couple of issues that I still need to resolve, but so far so good. Whenever I get the chance to do so, I'll continue working on this library, but paid work comes first.
SS_JGit
Author: Peter Simpson
Version: 1.0
- JGit
- Events:
- Complete (Action As String, Success As Boolean, Info As Map)
- Error (Action As String, Message As String)
- Progress (Action As String, Percent As Int)
- Functions:
- AddAll
Adds all new and changed files to the staging area. - CloneRepo (remoteUrl As String, localFolder As String, username As String, password As String)
Clones a remote repository to a local folder asynchronously.
remoteUrl is the URL of the remote repository.
localFolder is the local path where the repository will be cloned.
username is the authentication username.
password is the authentication password. - Commit (message As String) As Boolean
Commits staged changes to the local repository.
message is the commit message describing the changes. - CreateRemoteRepository (name As String, description As String, isPrivate As Boolean, topics As List, token As String)
Creates a new repository on GitHub with optional topics.
name is the name of the new repository.
description is a short description for the repo.
isPrivate is set to true for a private repository.
topics is a list of strings to be used as GitHub topics.
token is your Personal Access Token (requires 'repo' scope). - CreateTag (tagName As String) As Boolean
Creates a local tag on the current HEAD.
tagName is the name of the tag (e.g. v1.0). - DeleteRemoteRepository (owner As String, repoName As String, token As String)
Permanently deletes a repository from GitHub.
This method automatically cleans display tags (e.g. " (Public)") from the repoName.
owner is the owner of the repo.
repoName is the name of the repo (can include display tags).
token is your Personal Access Token (requires 'delete_repo' scope). - GetBlame (filePath As String) As List
Performs a Blame (Annotate) on a file.
Returns a List of Strings where each index corresponds to a line,
providing the commit ID and author of that line. - GetCurrentBranch As String
Returns the name of the currently active branch. - GetDiff (oldCommitId As String, newCommitId As String) As String
Generates a diff between two commit IDs (or HEAD and a commit).
Returns the diff as a String in standard unified format. - GetHeadCommit As String
Returns the object ID of the current HEAD commit. - GetRemoteTopics (owner As String, repoName As String, token As String)
Retrieves the list of topics for a GitHub repository.
owner is GitHub username or organisation.
repoName is repository name.
token is personal Access Token (requires 'repo' scope for private repos).
Raises raises GetTopics_complete with Info containing "Topics" as a List. - GetStatus As Map
Returns a Map containing the current status of the repository.
No event is raised by default to prevent event overwriting. - GetStatusEx (raiseEvent As Boolean) As Map
Returns a Map containing the current status of the repository.
If raiseEvent is true, it will raise a Complete event with action "GetStatus". - HasConflicts As Boolean
Checks if the repository is currently in a conflicting state. - Initialize (EventName As String)
Initialises the JGit engine.
EventName is the event name prefix for callbacks. - InitRepo (folder As String) As Boolean
Initialises a new Git repository in the specified folder.
folder is the path where the repository will be created. - IsRepo (folder As String) As Boolean
Checks if the specified folder contains a Git repository.
folder is the path to check. - ListRepositories (username As String, token As String) As List
Retrieves a list of repositories for a specific GitHub user.
Returns a list containing Maps.
username is the GitHub account name to query.
token is your Personal Access Token (required for private repos). - OpenRepo (folder As String) As Boolean
Opens an existing Git repository from the specified folder.
folder is the path to the existing repository. - Pull (username As String, password As String) As Boolean
Pulls changes from the remote repository.
username is the authentication username.
password is the authentication password. - Push (username As String, password As String) As Boolean
Pushes local changes to the remote repository.
This version also pushes tags to the remote.
username is the authentication username.
password is the authentication password (Personal Access Token for GitHub). - ResolveConflict (filePath As String)
Manually marks a file as resolved after a merge conflict. - SetRemoteTopics (owner As String, repoName As String, topics As List, token As String)
Replaces the topics (tags) for a GitHub repository.
owner is the GitHub username or organization name.
repoName is the name of the repository.
topics is a list of strings to be applied as topics (this replaces existing topics).
token is your Personal Access Token (requires 'repo' scope). - SetRemoteUrl (url As String)
Configures the remote URL (origin) for the current repository.
url is the GitHub clone URL.
- AddAll
- Events: