Skip to content

Commit 5ec7e64

Browse files
authored
Merge Release v2.0.1 PR to Master
# New Features - Branch searching feature for filtering required branches (#85) - Option to update repo name from settings (#78) # Improvements and Bug Fixes - Branch checkout bug (#120) - Branch list with invalid branch name when repo has no HEAD (#121) - Few minor UI polishes here and there - Updated axios version to resolve CVE-2020-28168
2 parents e3af7ac + a070a30 commit 5ec7e64

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+21315
-613
lines changed

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
patreon: neeldev96

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ Gitconvex displays logs in the command line. Please paste the error logs below
4747
>mark with [x] to select the check box
4848
4949
- [ ] Critical (The application crashes / breaks completely)
50-
- [ ] High (Blocks you from performing an critical operation)
50+
- [ ] High (Blocks you from performing a critical operation)
5151
- [ ] Moderate (Bearable or Manageable issue)
5252
- [ ] Low (Something is not right, but the impact is minimal)

.github/workflows/main.yml

+10-16
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Gitconvex build deploy
22

33
on:
44
push:
5-
branches: [ v2.0.0 ]
5+
branches: [ v2.0.1 ]
66

77
jobs:
88
build:
@@ -22,6 +22,15 @@ jobs:
2222
- name: Get dependencies
2323
run: |
2424
go get -v -t -d ./...
25+
26+
- name: Clone test repo
27+
run: |
28+
mkdir -p /home/runner/work/gitconvex-server/starfleet/
29+
git clone https://github.com/neel1996/starfleet.git /home/runner/work/gitconvex-server/starfleet/
30+
31+
- name: Overwrite mock test file
32+
run: |
33+
echo "# gitconvex GoLang project" > /home/runner/work/gitconvex/gitconvex/README.md
2534
2635
- name: Run test cases
2736
run: |
@@ -30,18 +39,3 @@ jobs:
3039
- name: Run sample build
3140
run: |
3241
go build -v
33-
34-
# Initiating build and S# deployment
35-
- name: Starting S3 deployment script from droplet
36-
uses: appleboy/ssh-action@master
37-
with:
38-
host: ${{ secrets.DROPLET_HOST }}
39-
username: ${{ secrets.DROPLET_USERNAME }}
40-
key: ${{ secrets.DROPLET_PRIVATE_KEY }}
41-
port: ${{ secrets.DROPLET_PORT }}
42-
script: |
43-
/opt/workroom/aws-build/init-deploy.sh
44-
/opt/workroom/aws-build/windows-deploy.sh
45-
/opt/workroom/aws-build/linux-deploy.sh
46-
/opt/workroom/aws-build/macos-deploy.sh
47-
/opt/workroom/aws-build/cleanup.sh

DOCUMENTATION.md

+17-18
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# Introduction
22
GitConvex is a web app for managing your git repositories. It is supported by Linux, Mac OS and Windows. The [latest version](https://github.com/neel1996/gitconvex/releases) of GitConvex supports git features such as initializing and tracking a git repo, staging and unstaging changes, committing changes, pushing changes to the selected remote and so on.
3-
The main goal of this platform is to act as a web-based alternative for Github desktop, but we are still in the starting stages, so we are not completely there yet (baby steps, right?)
3+
The main goal of this platform is to act as a web-based alternative for native git GUI clients and also to provide an option for managing git repos which are residing in servers with no GUI. Gitconvex is also available as a docker image along with the yaml files included in the repo for deploying it with k8s or docker swarm, which makes it a viable option for managing git repos residing within containers.
44
## Table of Contents
55
[Requirements](#requirements)<br>
66
[Download Options](#download-options)<br>
77
[Features available](#features-available)<br>
88
[How to use](#how-to-use)
99
- [Adding a new repo](#adding-a-new-repo)
1010
- [Repo Details](#repo-details)
11-
- [Add a new branch](#add-new-branch)
11+
- [List all branches](#list-all-branches)
1212

1313
## Requirements
1414
1. [Git](https://git-scm.com/) (Version 2.20+)
@@ -92,17 +92,17 @@ The repo detail view also provides features for performing the following operati
9292
- Code view for valid files from the file explorer view
9393
- Loading commit logs dynamically
9494
```
95-
96-
![repo-card-details](https://user-images.githubusercontent.com/65342122/89164057-30deb800-d594-11ea-94d6-d3a330260044.png)
95+
![repo-card-details](https://user-images.githubusercontent.com/65342122/103479129-82b09600-4df1-11eb-808f-9a6eba736841.png)
9796

9897
### Commit logs
9998

10099
- With commit log searchbar, any commit log can be looked up using its commit message or commit hash or author name who created that commit.
101100

102101
![commit-logs](https://user-images.githubusercontent.com/65342122/90782955-1723cb80-e31d-11ea-9c42-d1d5a6306e6f.png)
103102

104-
#### Add new branch
105-
![new-branch](https://user-images.githubusercontent.com/65342122/87232643-23437180-c3de-11ea-9d9e-7e3c3789c32e.png)
103+
#### List all branches
104+
105+
![branches](https://user-images.githubusercontent.com/65342122/103480861-f7d59880-4dfc-11eb-9a19-17636d111388.png)
106106

107107
Note: In a newly initialized git repo, the newly added branch will be considered by git only after an initial commit
108108

@@ -111,30 +111,27 @@ Note: In a newly initialized git repo, the newly added branch will be considered
111111

112112
### File View
113113
- File view shows the New/Untracked/Modified/Deleted files.
114-
![file-view](https://user-images.githubusercontent.com/65342122/87232644-29d1e900-c3de-11ea-9adc-03fb4e690882.png)
114+
![file-view](https://user-images.githubusercontent.com/65342122/103479243-577a7680-4df2-11eb-97f0-35c318d1c0c0.png)
115115

116116
### Git Operations
117117
- Git operations module lets you handle three basic git operations (**Stage all changes, commit changes, push to remote**). Below this option, the files will be displayed and the files can be staged individually using the "Add" button or as a whole using the "stage all changes".
118-
![git-operations](https://user-images.githubusercontent.com/65342122/87232645-30f8f700-c3de-11ea-8ddb-52f4d5ec7140.png)
118+
![git-operations](https://user-images.githubusercontent.com/65342122/103480923-7f230c00-4dfd-11eb-95c7-abf0aadd0aec.png)
119119

120120
- The staged files can be removed individually or it can be removed all at once.
121-
![staged-files](https://user-images.githubusercontent.com/65342122/89167388-ff1c2000-d598-11ea-8150-fc96b6aa41b7.png)
121+
![staged-files](https://user-images.githubusercontent.com/65342122/103479263-82fd6100-4df2-11eb-93e2-e731479ef4f1.png)
122122

123123
- The staged changes can be committed using the **Commit changes** option. This will display a pop-up with all the staged files and it requires a commit message to successfully commit the changes. The commit messages can either be a single line message or a multi-line message
124-
![commit-changes](https://user-images.githubusercontent.com/65342122/87232659-56860080-c3de-11ea-9bc4-a19ad727b101.png)
125-
126-
- **Push to remote** option pushes all commits to the selected remote host. The pop-up displayed will display the commits which are in queue to be pushed to the remote repository
124+
![commit-changes](https://user-images.githubusercontent.com/65342122/103479271-95779a80-4df2-11eb-91c8-835742758ad4.png)
127125

128-
![push-operation-with-remote](https://user-images.githubusercontent.com/65342122/89562600-d796b300-d837-11ea-969c-9abb93f24c1c.png)
126+
- **Push to remote** option pushes all commits to the selected remote host. The pop-up displayed will display the commits which are in queue to be pushed to the remote repository.
129127

130-
This section will let you know if the selected remote is not valid or if the push operation fails
131-
![push-opeartion-without-remote](https://user-images.githubusercontent.com/65342122/89562476-a1f1ca00-d837-11ea-9f3a-bb566aeb327e.png)
128+
![push-operation-with-remote](https://user-images.githubusercontent.com/65342122/103480641-66b1f200-4dfb-11eb-9753-e736bdb49b43.png)
132129

133130
### Git Difference
134131

135132
In "Git Difference" click on the modified file to see the difference. The platform has syntax highlighting available for a limited set of [languages](LANGUAGES.md)
136133

137-
![git-difference](https://user-images.githubusercontent.com/65342122/89559704-ab793300-d833-11ea-88a8-28afea4b461b.png)
134+
![git-difference](https://user-images.githubusercontent.com/65342122/103480618-497d2380-4dfb-11eb-99d5-08543457c445.png)
138135

139136
## Compare
140137
- The **Compare** menu has two sections: **Branch compare** and **Commit compare**.
@@ -149,10 +146,11 @@ In "Git Difference" click on the modified file to see the difference. The platfo
149146

150147
## Settings
151148
- Settings in the left pane has three sections (Server data file, saved repos, Active GitConvex port number).
152-
![settings](https://user-images.githubusercontent.com/65342122/87243003-a4871c80-c44f-11ea-9d1a-8350bdfb0da8.png)
149+
![settings](https://user-images.githubusercontent.com/65342122/103557499-53755400-4ed9-11eb-9c37-7ffb7891fc2e.png)
153150

154151
- Server data file stores repo details such as the repo path, timestamp and the unique ID assigned to each repo. The data file must be an accessible JSON file with read / write permissions set to it. Also make sure you enter the full path for the file. E.g: /opt/my_data/data-file.json
155152
- In the saved repos section, added repo(s) can be deleted permanently from GitConvex.
153+
- Saved repo name can be changed in this section.
156154

157155
>Note that, this will only remove the repo from GitConvex records and it will not perform an actual folder delete operation
158156
@@ -161,4 +159,5 @@ In "Git Difference" click on the modified file to see the difference. The platfo
161159
## Help and Support
162160

163161
- Visit help section if you're facing an issue or need any help. If you have any queries or feedback, then discuss it in "Discord" or report an issue in GitHub.
164-
![help-and-support](https://user-images.githubusercontent.com/65342122/101987492-5efaa400-3cba-11eb-87fb-6d8cb19ae9d2.png)
162+
- You can check the current version of Gitconvex by clicking on the update button in this section.
163+
![help-and-support](https://user-images.githubusercontent.com/65342122/103891656-3eced100-5110-11eb-9497-3daf8d4195d2.png)

README.md

+29-25
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
11
# Gitconvex
22

3+
### Web application for managing all your git repositories
4+
35
<p align="center">
46
<img src="https://user-images.githubusercontent.com/47709856/87170859-8bfff080-c2ef-11ea-9140-b9e5db1c17d8.png" width="280">
57
<p align="center">
68
<a href="https://www.producthunt.com/posts/gitconvex-2?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-gitconvex-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=241240&theme=dark" alt="gitconvex - A web based UI client for managing git repositories | Product Hunt Embed" style="width: 250px; height: 54px;" width="250px" height="54px" /></a>
79
</p>
810
</p>
911

10-
## Web application for managing your git repositories
12+
## Build Status
1113

12-
![open issues](https://img.shields.io/github/issues/neel1996/gitconvex?color=orange&style=for-the-badge)
1314
![Gitconvex UI pipeline](https://img.shields.io/github/workflow/status/neel1996/gitconvex-ui/Gitconvex%20UI%20pipeline/master?label=gitconvex%20ui%20build&logo=github&style=for-the-badge)
1415
![Gitconvex Server pipeline](https://img.shields.io/github/workflow/status/neel1996/gitconvex-server/Gitconvex%20Server%20Pipeline/main?label=gitconvex%20server%20build&logo=github&style=for-the-badge)
1516

1617
# Download options
1718

1819
> Use any of the below options to get gitconvex for your system
1920
20-
[![github release](https://img.shields.io/static/v1?label=gitconvex&message=v2.0.0&color=green&style=for-the-badge&logo=github)](https://github.com/neel1996/gitconvex-package/releases)
21-
[![docker image](https://img.shields.io/static/v1?label=gitconvex&message=v2.0.0&color=blue&style=for-the-badge&logo=docker)](https://hub.docker.com/repository/docker/itassistors/gitconvex)
22-
[![License](https://img.shields.io/static/v1?label=LICENSE&message=Apache-2.0&color=yellow&style=for-the-badge)](LICENSE)
21+
[![github release](https://img.shields.io/static/v1?label=gitconvex&message=v2.0.1&color=green&style=for-the-badge&logo=github)](https://github.com/neel1996/gitconvex-package/releases)
22+
[![docker image](https://img.shields.io/static/v1?label=gitconvex&message=v2.0.1&color=blue&style=for-the-badge&logo=docker)](https://hub.docker.com/repository/docker/itassistors/gitconvex)
23+
2324

2425
- **Option - 1** Cloning repo from **github**
2526

2627
**To be Noted :** The `master` branch contains the latest stable build of the project. For a reliable experience, always clone the repo from the master branch.
2728

28-
```
29+
``` shell
2930

30-
$ git clone https://github.com/neel1996/gitconvex.git
31-
$ cd gitconvex
31+
git clone https://github.com/neel1996/gitconvex.git
32+
cd gitconvex
3233

3334
# for Mac & Linux
34-
35-
$ make build
35+
make build
3636

3737
# for Windows
38-
39-
$ ./make.bat build
38+
./make.bat build
4039

4140
## After build completion...
42-
43-
$ ./dist/gitconvex-server
41+
./dist/gitconvex-server
4442

4543
2020/11/14 22:57:47 INFO: Starting Gitconvex server modules
4644
2020/11/14 22:57:47 INFO: Using available env config file
@@ -50,37 +48,38 @@ $ ./dist/gitconvex-server
5048

5149
- **Option - 2** If you are into **docker**, then there is also a docker image available for gitconvex
5250

53-
`docker pull itassistors/gitconvex`
51+
``` shell
52+
docker pull itassistors/gitconvex
53+
```
5454

5555
**Note:** Make sure you mount the host volume to the container to access the git repos from the host system. If you have git repos stored within your containers, then this is not required
5656

5757
- **Option - 3** Downloading the zip file from the tagged github [**release**](https://github.com/neel1996/gitconvex/releases)
5858

59-
```
59+
``` shell
6060
## Extract the downloaded zip file and execute the commands
61-
62-
$ cd gitconvex
61+
cd gitconvex
6362

6463
# for Mac & Linux
65-
$ make build
64+
make build
6665

6766
# for Windows
68-
$ ./make.bat build
67+
./make.bat build
6968

7069
```
7170

7271
# Platforms
7372

7473
|supported platforms|
75-
|--|
74+
|---|
7675
|Linux :penguin: |
7776
|Mac OS :apple: |
7877
|Windows :black_square_button: |
7978

8079
## Requirements
8180

8281
| Software | Purpose |
83-
| -- | -- |
82+
| --- | --- |
8483
| <b>[Git](https://git-scm.com/)</b> | <b>Required for handling some intense git operations with the target repo</b> |
8584
| <b>[Go](https://golang.org/)</b> | <b>For building the backend from the source</b> |
8685
| <b>[Node JS](https://nodejs.org/en/)</b> | <b>For building the react UI bundle from scratch</b> |
@@ -91,15 +90,15 @@ If you are a windows user, then make sure that `git` is accessible from the comm
9190

9291
- Open command prompt or powershell and enter `git --version` and press enter. If it displays the following output, then it is fine
9392

94-
```
93+
``` cmd
9594
C:\> git --version
9695
9796
git version 2.28.0.windows.1
9897
```
9998

10099
If this output is not displayed and if the command throws the following error, then it shows that `git` is not added to the 'path' environment variable and it will not be accessible directly from the command line,
101100

102-
```
101+
``` cmd
103102
C:\> git --version
104103
105104
'git' is not recognized as an internal or external command,
@@ -140,9 +139,14 @@ For reporting issues or for requesting any feature use the following medium,
140139

141140
[**Discord Channel** ](https://discord.gg/PSd2Cq9)
142141

142+
[**Website**](https://gitconvex.com/)
143+
143144
[**Github Issue Reporting**](https://github.com/neel1996/gitconvex/issues)
144145

146+
![open issues](https://img.shields.io/github/issues/neel1996/gitconvex?color=orange&style=for-the-badge)
147+
145148
# License
146149

147-
See [LICENSE ](LICENSE) info for more
150+
[![License](https://img.shields.io/static/v1?label=LICENSE&message=Apache-2.0&color=yellow&style=for-the-badge)](LICENSE)
151+
148152

api/update_repo_name.go

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package api
2+
3+
import (
4+
"fmt"
5+
"github.com/neel1996/gitconvex-server/global"
6+
"github.com/neel1996/gitconvex-server/utils"
7+
)
8+
9+
// UpdateRepoName updates the repository name in the data store JSON file
10+
// with the new file name
11+
func UpdateRepoName(repoId string, repoName string) (string, error) {
12+
logger.Log(fmt.Sprintf("Initating Repo Name update for %s - to new name %s", repoId, repoName), global.StatusInfo)
13+
repoDataArray := utils.DataStoreFileReader()
14+
for idx, repoData := range repoDataArray {
15+
if repoData.RepoId == repoId {
16+
logger.Log("Matching repo found in data file", global.StatusInfo)
17+
repoData.RepoName = repoName
18+
repoDataArray[idx] = repoData
19+
break
20+
}
21+
}
22+
23+
logger.Log("Writing updated repo data to the JSON file", global.StatusInfo)
24+
err := utils.DataFileWriter(repoDataArray)
25+
26+
if err != nil {
27+
logger.Log("Repo data update failed --> "+err.Error(), global.StatusError)
28+
return "Unable to update repo name", err
29+
} else {
30+
logger.Log("Repo data updated successfully", global.StatusInfo)
31+
return "Repo name updated successfully", nil
32+
}
33+
}

git/git_branch_list.go

+10-2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ func GetBranchList(repo *git.Repository, branchChan chan Branch) {
6464
splitCurrentBranch := strings.Split(currentBranch, "/")
6565
currentBranch = splitCurrentBranch[len(splitCurrentBranch)-1]
6666

67+
allBranchList = append(allBranchList, &currentBranch)
68+
branches = append(branches, &currentBranch)
69+
6770
ref, _ := repo.References()
6871

6972
if ref != nil {
@@ -83,7 +86,10 @@ func GetBranchList(repo *git.Repository, branchChan chan Branch) {
8386
} else {
8487
refNamePtr = &refNameSplit[1]
8588
}
86-
allBranchList = append(allBranchList, refNamePtr)
89+
if *refNamePtr != currentBranch {
90+
allBranchList = append(allBranchList, refNamePtr)
91+
}
92+
8793
}
8894
}
8995
}
@@ -104,7 +110,9 @@ func GetBranchList(repo *git.Repository, branchChan chan Branch) {
104110
localBranch = splitBranch[len(splitBranch)-1]
105111

106112
logger.Log("Available Branch : "+localBranch, global.StatusInfo)
107-
branches = append(branches, &localBranch)
113+
if localBranch != currentBranch {
114+
branches = append(branches, &localBranch)
115+
}
108116
}
109117
return nil
110118
} else {

gitconvex-k8s.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: gitconvex
5+
spec:
6+
replicas: 3
7+
selector:
8+
matchLabels:
9+
app: gitconvex
10+
template:
11+
metadata:
12+
labels:
13+
app: gitconvex
14+
spec:
15+
containers:
16+
- name: gitconvex
17+
image: itassistors/gitconvex
18+
resources:
19+
limits:
20+
memory: "128Mi"
21+
cpu: "500m"
22+
ports:
23+
- containerPort: 9001

0 commit comments

Comments
 (0)