Skip to content

Commit 5995032

Browse files
authored
Merge pull request #25 from fenix-hub/v0.7.5
V0.7.5
2 parents 20fa211 + 1cf3e87 commit 5995032

File tree

8 files changed

+2564
-27
lines changed

8 files changed

+2564
-27
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ If you want to see some screenshots you can find them here `addons/github-integr
2828
For my first donation I decided to add a SUPPORTERS.md file where there is a list of people who decided to financially support this plugin. I will never ask for anything in return for the free service I want to offer to Godot's community, but it will always be an act of kindness that will encourage me to keep my plugins and projects updated.
2929
Here's the [Supporters List](./SUPPORTERS.md)
3030

31-
### What do I want for a v-1.0.0 ?
32-
The first complete and released version will be set once the main operations you can do on GitHub browser and app will be available in this addon (ex. Committing and Pushing, Branching, Pulling) placed side by side with a full error handling.
31+
### About Updates
32+
**Since v0.7.5 I've decided to not update this plugin anymore.**
33+
It doesn't mean this plugin won't be supported anymore, or I will abandon it: I'm planning to fully migrate this project from a simple GDScript addon to a C++ module for Godot.
34+
Eventual bugfixes and additional little features will still be implemented if they are needed to support all platforms and to stay updated to Godot Engine's new version, but due to GDScript and Godot limits, I'll migrate the whole code to a C++, fully implemented and optimized GitHub module.
35+
Please, watch this project or join Discord groups I've mentioned in this page to get all updates.
3336

3437
# Disclaimer
3538
This addon was built for a **personal use** intention. It was released as an open source plugin in the hope that it could be useful to the Godot Engine Community.
@@ -38,5 +41,3 @@ I don't assume any responsibility for possible corruptions of your project. It i
3841

3942
-----------------
4043
> This text file was created via [TextEditor Integration](https://github.com/fenix-hub/godot-engine.text-editor) inside Godot Engine's Editor.
41-
42-
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/github-logo.png-47e01e9fc59994c0db55903788d0795b.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://addons/github-integration/github-logo.png"
13+
dest_files=[ "res://.import/github-logo.png-47e01e9fc59994c0db55903788d0795b.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/github-logo.png-ecbc9f6d20796b46b889486439e860bc.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://addons/github-integration/resources/github-logo.png"
13+
dest_files=[ "res://.import/github-logo.png-ecbc9f6d20796b46b889486439e860bc.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=false
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=false
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=false
34+
svg/scale=1.0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/throbber.png-ae03ce9c717cd2fb342f9f5d37de98d0.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://addons/github-integration/resources/loading/throbber.png"
13+
dest_files=[ "res://.import/throbber.png-ae03ce9c717cd2fb342f9f5d37de98d0.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/proxy.png-eb05e86e1b09889d8d9cb4eff7df2f1b.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://addons/github-integration/resources/proxy.png"
13+
dest_files=[ "res://.import/proxy.png-eb05e86e1b09889d8d9cb4eff7df2f1b.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

addons/github-integration/scenes/GitHub.tscn.tmp

Lines changed: 2365 additions & 0 deletions
Large diffs are not rendered by default.

addons/github-integration/scripts/Commit.gd

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func request_completed(result, response_code, headers, body ):
113113
REQUESTS.UPLOAD:
114114
if response_code == 201:
115115
hide()
116-
get_parent().print_debug_message("commited and pushed...")
116+
print(get_parent().plugin_name,"commited and pushed...")
117117
get_parent().UserPanel.request_repositories(get_parent().UserPanel.REQUESTS.UP_REPOS)
118118
elif response_code == 422:
119119
error.text = "Error: "+JSON.parse(body.get_string_from_utf8()).result.errors[0].message
@@ -123,46 +123,46 @@ func request_completed(result, response_code, headers, body ):
123123
pass
124124
REQUESTS.COMMIT:
125125
if response_code == 201:
126-
get_parent().print_debug_message("file committed!")
127-
get_parent().print_debug_message(" ")
126+
print(get_parent().plugin_name,"file committed!")
127+
print(get_parent().plugin_name," ")
128128
emit_signal("file_committed")
129129
if response_code == 200:
130-
get_parent().print_debug_message("file updated!")
131-
get_parent().print_debug_message(" ")
130+
print(get_parent().plugin_name,"file updated!")
131+
print(get_parent().plugin_name," ")
132132
emit_signal("file_committed")
133133
if response_code == 422:
134-
get_parent().print_debug_message("file already exists, skipping...")
135-
get_parent().print_debug_message(" ")
134+
print(get_parent().plugin_name,"file already exists, skipping...")
135+
print(get_parent().plugin_name," ")
136136
emit_signal("file_committed")
137137
REQUESTS.LATEST_COMMIT:
138138
if response_code == 200:
139139
sha_latest_commit = JSON.parse(body.get_string_from_utf8()).result.object.sha
140-
get_parent().print_debug_message("got last commit")
140+
print(get_parent().plugin_name,"got last commit")
141141
emit_signal("latest_commit")
142142
REQUESTS.BASE_TREE:
143143
if response_code == 200:
144144
sha_base_tree = JSON.parse(body.get_string_from_utf8()).result.tree.sha
145-
get_parent().print_debug_message("got base tree")
145+
print(get_parent().plugin_name,"got base tree")
146146
emit_signal("base_tree")
147147
REQUESTS.BLOB:
148148
if response_code == 201:
149149
list_file_sha.append(JSON.parse(body.get_string_from_utf8()).result.sha)
150-
get_parent().print_debug_message("blobbed file")
150+
print(get_parent().plugin_name,"blobbed file")
151151
# OS.delay_msec(1000)
152152
emit_signal("file_blobbed")
153153
REQUESTS.NEW_TREE:
154154
if response_code == 201:
155155
sha_new_tree = JSON.parse(body.get_string_from_utf8()).result.sha
156-
get_parent().print_debug_message("created new tree of files")
156+
print(get_parent().plugin_name,"created new tree of files")
157157
emit_signal("new_tree")
158158
REQUESTS.NEW_COMMIT:
159159
if response_code == 201:
160160
sha_new_commit = JSON.parse(body.get_string_from_utf8()).result.sha
161-
get_parent().print_debug_message("created new commit")
161+
print(get_parent().plugin_name,"created new commit")
162162
emit_signal("new_commit")
163163
REQUESTS.PUSH:
164164
if response_code == 200:
165-
get_parent().print_debug_message("pushed and committed with success!")
165+
print(get_parent().plugin_name,"pushed and committed with success!")
166166
get_parent().loading(false)
167167
Loading.hide()
168168
emit_signal("pushed")
@@ -193,7 +193,7 @@ func _on_Button_pressed():
193193
get_parent().loading(true)
194194

195195
load_gitignore()
196-
get_parent().print_debug_message("fetching all files in project...")
196+
print(get_parent().plugin_name,"fetching all files in project...")
197197

198198

199199
request_sha_latest_commit()
@@ -205,10 +205,10 @@ func load_gitignore():
205205
var dir = Directory.new()
206206
if not dir.dir_exists(gitignore_filepath):
207207
dir.make_dir_recursive(gitignore_filepath)
208-
print("[GitHub Integration] >> ","made directory in user folder for this .gitignore file, at ",gitignore_filepath)
208+
get_parent().print_debug_message(0,"made directory in user folder for this .gitignore file, at %s"%gitignore_filepath)
209209

210210
var ignorefile = File.new()
211-
var error = ignorefile.open(gitignore_filepath+".gitignore",File.WRITE)
211+
var error = ignorefile.open(gitignore_filepath+"gitignore.txt",File.WRITE)
212212
for line in range(0,Gitignore.get_line_count()):
213213
var gitline = Gitignore.get_line(line)
214214
ignorefile.store_line(gitline)
@@ -220,7 +220,7 @@ func load_gitignore():
220220
pass
221221
ignorefile.close()
222222

223-
files.push_front(gitignore_filepath+".gitignore")
223+
files.push_front(gitignore_filepath+"gitignore.txt")
224224

225225
var filtered_files : Array = []
226226

@@ -239,7 +239,7 @@ func load_gitignore():
239239

240240
files.clear()
241241
files = filtered_files
242-
files.push_front(gitignore_filepath+".gitignore")
242+
files.push_front(gitignore_filepath+"gitignore.txt")
243243
emit_signal("files_filtered")
244244

245245
# |---------------------------------------------------------|
@@ -283,9 +283,11 @@ func request_blobs():
283283
f.open(file,File.READ)
284284
content = Marshalls.raw_to_base64(f.get_buffer(f.get_len()))
285285

286-
get_parent().print_debug_message("blobbing ~> "+file.get_file())
287-
286+
# for content in branches_contents:
287+
# if content.path == file[0].lstrip(DIRECTORY+START_FROM+"/"):
288+
# sha = content.sha
288289

290+
print(get_parent().plugin_name,"blobbing ~> "+file.get_file())
289291

290292
var bod = {
291293
"content":content,
@@ -297,15 +299,15 @@ func request_blobs():
297299

298300
Progress.set_value(range_lerp(files.find(file),0,files.size(),0,100))
299301

300-
get_parent().print_debug_message("blobbed each file with success, start committing...")
302+
print(get_parent().plugin_name,"blobbed each file with success, start committing...")
301303
Progress.set_value(100)
302304
request_commit_tree()
303305

304306
func request_commit_tree():
305307
requesting = REQUESTS.NEW_TREE
306308
var tree = []
307309
for i in range(0,files.size()):
308-
if files[i].get_file() == ".gitignore":
310+
if files[i].get_file() == "gitignore.txt":
309311
tree.append({
310312
"path":".gitignore",
311313
"mode":"100644",
@@ -479,4 +481,3 @@ func on_nothing_selected():
479481

480482
func about_gitignore_pressed():
481483
OS.shell_open("https://git-scm.com/docs/gitignore")
482-
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[remap]
2+
3+
importer="texture"
4+
type="StreamTexture"
5+
path="res://.import/placeholder.png-55fb8c8b5ea4590d4708ea0062eb2426.stex"
6+
metadata={
7+
"vram_texture": false
8+
}
9+
10+
[deps]
11+
12+
source_file="res://addons/github-integration/user/placeholder.png"
13+
dest_files=[ "res://.import/placeholder.png-55fb8c8b5ea4590d4708ea0062eb2426.stex" ]
14+
15+
[params]
16+
17+
compress/mode=0
18+
compress/lossy_quality=0.7
19+
compress/hdr_mode=0
20+
compress/bptc_ldr=0
21+
compress/normal_map=0
22+
flags/repeat=0
23+
flags/filter=true
24+
flags/mipmaps=false
25+
flags/anisotropic=false
26+
flags/srgb=2
27+
process/fix_alpha_border=true
28+
process/premult_alpha=false
29+
process/HDR_as_SRGB=false
30+
process/invert_color=false
31+
stream=false
32+
size_limit=0
33+
detect_3d=true
34+
svg/scale=1.0

0 commit comments

Comments
 (0)