Skip to content
Merged

Temp #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,9 @@ MIT License - see LICENSE file for details.

## Support

- **Documentation**: [Wiki](https://github.com/yourusername/erpnext_github_integration/wiki)
- **Issues**: [GitHub Issues](https://github.com/yourusername/erpnext_github_integration/issues)
- **Discussions**: [GitHub Discussions](https://github.com/yourusername/erpnext_github_integration/discussions)
- **Documentation**: [Wiki](https://github.com/Yankyyyy/erpnext_github_integration/wiki)
- **Issues**: [GitHub Issues](https://github.com/Yankyyyy/erpnext_github_integration/issues)
- **Discussions**: [GitHub Discussions](https://github.com/Yankyyyy/erpnext_github_integration/discussions)

## Changelog

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,13 @@ frappe.ui.form.on("GitHub Settings", {
frappe.call({
method: 'erpnext_github_integration.github_api.sync_all_repositories',
callback: function(r) {
frappe.msgprint(__('All repositories sync initiated. Check background jobs for progress.'));
},
error: function(err) {
frappe.msgprint(__('Error initiating sync: {0}', [err.responseText || JSON.stringify(err)]));
if (r.message) {
frappe.msgprint({
title: __('Repositories Sync'),
indicator: r.message.failed > 0 ? 'red' : 'green',
message: __(`Success: ${r.message.success}<br>Failed: ${r.message.failed}`)
});
}
}
});
});
Expand Down
3 changes: 2 additions & 1 deletion erpnext_github_integration/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
# Read docs to understand patches: https://frappeframework.com/docs/v14/user/en/database-migrations

[post_model_sync]
# Patches added in this section will be executed after doctypes are migrated
# Patches added in this section will be executed after doctypes are migrated
erpnext_github_integration.patches.add_github_username
12 changes: 12 additions & 0 deletions erpnext_github_integration/patches/add_github_username.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import frappe

def execute():
if not frappe.db.exists("Custom Field", {"dt": "User", "fieldname": "github_username"}):
frappe.get_doc({
"doctype": "Custom Field",
"dt": "User",
"fieldname": "github_username",
"label": "GitHub Username",
"fieldtype": "Data",
"insert_after": "username"
}).insert()
10 changes: 0 additions & 10 deletions erpnext_github_integration/patches/after_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ def create_custom_fields_and_scripts():

# Custom fields to be created
custom_fields = {
'User': [
dict(
fieldname='github_username',
label='GitHub Username',
fieldtype='Data',
insert_after='email',
unique=1,
description='GitHub username for integration purposes'
)
],
'Project': [
dict(
fieldname='repository',
Expand Down
Loading
Loading