Skip to content

Commit 70f139a

Browse files
authored
Merge pull request #78 from fenix-hub/dev
*fixed:* - first login bug
2 parents 3002037 + 14b0e1b commit 70f139a

File tree

6 files changed

+42
-13
lines changed

6 files changed

+42
-13
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
Check my **[Discord](https://discord.gg/KnJGY9S)** to stay updated on this repository.
2-
*(Recommended since the AssetLibrary is not automatically updated)*
1+
<p align="right">
2+
<a href="https://discord.gg/KnJGY9S">
3+
<img src="https://github.com/fenix-hub/ColoredBadges/blob/master/svg/social/discord.svg" alt="react" style="vertical-align:top; margin:6px 4px">
4+
</a>
5+
</p>
36

47
This plugin is now supported in [Godot Extended Library Discord](https://discord.gg/JNrcucg), check out the [Godot Extended Library Project](https://github.com/godot-extended-libraries)!
58

@@ -20,6 +23,13 @@ Godot Version: *3.2.3stable*
2023
Pushing and Pulling personal repositories while I'm working on Godot (especially if I'm under a GameJam) could take some time and force me to save the project, open the brwoser/git bash/git gui, and do all the stuff.
2124
With this little addon which works directly in the editor, managing all your repositories will be very easy.
2225

26+
## What can it do?
27+
*Github Integration* offers the main functionalities provided by GitHub (and git itself), in a more accessible way.
28+
Currenlty, you can:
29+
- Manage all of your public and private **repositories**, *including* the ones you share with organizations and the ones in which you are a collaborator (with proper permissions): create, delete, push and clone repositories within your Godot project
30+
- Manage all of your public and private **gists**: delete, edit and create gists with a functional text editor
31+
- Manage collaboration invitations, inviting user to your repositories or accept/decline invitations you have received
32+
2333
## How does it work?
2434
I'm currently working on a [Wiki](https://github.com/fenix-hub/godot-engine.github-integration/wiki) for this plugin. It is a process that will take some time to complete since I want to provide a well-organized wiki with some basic explanations about GitHub itself. Anyway, I'm working on a user-friendly plugin, so everything should be the very ease to use for GitHub experienced users, and a little intuitive for people who never used GitHub or are not so experienced.
2535
If you want to see some screenshots you can find them here `addons/github-integration/screenshots`
@@ -36,11 +46,7 @@ If you want to see some screenshots you can find them here `addons/github-integr
3646
</tr>
3747
</table>
3848

39-
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.
40-
Here's the [Supporters List](./SUPPORTERS.md)
41-
4249
## :warning: Disclaimer
43-
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.
4450
As a "work in progress" project, there is *no warranty* for any eventual issue and bug that may broke your project.
4551
I don't assume any responsibility for possible corruptions of your project. It is always advisable to keep a copy of your project and check any changes you make in your Github repository.
4652

addons/github-integration/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="GitHub integration"
44
description="Plugin to integrate GitHub requests directly via Godot Engine Editor"
55
author="Nicolo (fenix) Santilio"
6-
version="1.3.2"
6+
version="1.3.4"
77
script="scripts/github-integration.gd"

addons/github-integration/scripts/GitHub.gd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ func _ready():
8181
var connection = yield(RestHandler, "_check_connection")
8282
match connection:
8383
true:
84-
SignIn.btnSignIn.set_disabled(false)
8584
ConnectionIcon.set_texture(connection_status[2])
8685
ConnectionIcon.set_tooltip("Connected to GitHub API")
8786
RestartConnection.hide()
8887
false:
89-
SignIn.btnSignIn.set_disabled(true)
9088
ConnectionIcon.set_texture(connection_status[1])
9189
ConnectionIcon.set_tooltip("Can't connect to GitHub API, check your internet connection or API status")
9290
RestartConnection.show()

addons/github-integration/scripts/Repo.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ func open_repository(repository_item : RepositoryItem) -> void:
166166

167167
load_icons(repository)
168168

169-
load_collaborators(repository.collaborators.nodes as Array)
170-
load_contributors(collaborators_login, repository.mentionableUsers.nodes as Array)
169+
if repository.collaborators != null :
170+
load_collaborators(repository.collaborators.nodes as Array)
171+
load_contributors(collaborators_login, repository.mentionableUsers.nodes as Array)
171172

172173
if branches.size():
173174
default_branch_lbl.text = str(repository.defaultBranchRef.name)

addons/github-integration/scripts/SignIn.gd

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ var logfile : bool = false
2424

2525
onready var Client : HTTPClient = HTTPClient.new()
2626

27+
var userdata : bool = false
28+
2729
func connect_signals() -> void:
30+
Mail.connect("text_changed", self, "_on_mail_changed")
31+
Token.connect("text_changed", self, "_on_token_changed")
32+
2833
btnSignIn.connect("pressed",self,"sign_in")
2934
btnCreateToken.connect("pressed",self,"create_token")
3035

@@ -41,16 +46,26 @@ func _ready() -> void:
4146
connect_signals()
4247
LogfileIcon.hide()
4348
Error.hide()
44-
45-
btnSignIn.set_disabled(true)
49+
4650
DeleteDataBtn.set_disabled(true)
4751

52+
yield(get_tree(),"idle_frame")
53+
check_user()
54+
55+
func _on_userdata_ready():
56+
userdata = true
57+
58+
func check_user():
4859
if UserData.user_exists():
4960
logfile = true
5061
LogfileIcon.show()
5162
DeleteDataBtn.disabled = false
5263
Mail.text = "<logfile.mail>"
64+
_on_mail_changed(Mail.text)
5365
Token.text = "<logfile.password>"
66+
_on_token_changed(Token.text)
67+
get_parent().print_debug_message("user data found, just sign in without using your credentials.")
68+
btnSignIn.set_disabled(false)
5469

5570
func set_darkmode(darkmode : bool) -> void:
5671
if darkmode:
@@ -131,3 +146,11 @@ func delete_user():
131146

132147
func close_popup() :
133148
DeleteHover.hide()
149+
150+
func _on_mail_changed(text : String):
151+
if not text in [""," "] and not Token.text in [""," "]: btnSignIn.set_disabled(false)
152+
else: if not logfile: btnSignIn.set_disabled(true)
153+
154+
func _on_token_changed(text : String):
155+
if not text in [""," "] and not Mail.text in [""," "]: btnSignIn.set_disabled(false)
156+
else: if not logfile: btnSignIn.set_disabled(true)

addons/github-integration/scripts/user_data.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var gitlfs_request : String = ".git/info/lfs/objects/batch"
3939
var plugin_version : String = "0.9.4"
4040

4141
func _ready():
42+
PluginSettings._check_plugin_path()
4243
directory = PluginSettings.plugin_path
4344

4445
func user_exists():

0 commit comments

Comments
 (0)