abapgit-agent 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +1 -0
  2. package/abap/guidelines/00_index.md +35 -0
  3. package/abap/guidelines/01_sql.md +72 -0
  4. package/abap/guidelines/02_exceptions.md +108 -0
  5. package/abap/guidelines/03_testing.md +252 -0
  6. package/abap/guidelines/04_cds.md +120 -0
  7. package/abap/guidelines/05_classes.md +50 -0
  8. package/abap/guidelines/06_objects.md +103 -0
  9. package/abap/guidelines/07_json.md +22 -0
  10. package/abap/guidelines/08_abapgit.md +193 -0
  11. package/bin/abapgit-agent +467 -30
  12. package/bin/abgagt +24 -0
  13. package/package.json +8 -2
  14. package/src/abap-client.js +65 -2
  15. package/src/agent.js +57 -3
  16. package/src/ref-search.js +989 -0
  17. package/.abapGitAgent.example +0 -11
  18. package/.github/workflows/release.yml +0 -60
  19. package/API.md +0 -710
  20. package/CLAUDE.md +0 -1058
  21. package/CLAUDE_MEM.md +0 -88
  22. package/ERROR_HANDLING.md +0 -30
  23. package/INSTALL.md +0 -155
  24. package/RELEASE_NOTES.md +0 -143
  25. package/abap/CLAUDE.md +0 -1010
  26. package/abap/copilot-instructions.md +0 -79
  27. package/abap/package.devc.xml +0 -10
  28. package/abap/zcl_abgagt_agent.clas.abap +0 -420
  29. package/abap/zcl_abgagt_agent.clas.xml +0 -15
  30. package/abap/zcl_abgagt_cmd_factory.clas.abap +0 -48
  31. package/abap/zcl_abgagt_cmd_factory.clas.xml +0 -15
  32. package/abap/zcl_abgagt_command_create.clas.abap +0 -95
  33. package/abap/zcl_abgagt_command_create.clas.xml +0 -15
  34. package/abap/zcl_abgagt_command_import.clas.abap +0 -138
  35. package/abap/zcl_abgagt_command_import.clas.xml +0 -15
  36. package/abap/zcl_abgagt_command_inspect.clas.abap +0 -456
  37. package/abap/zcl_abgagt_command_inspect.clas.testclasses.abap +0 -121
  38. package/abap/zcl_abgagt_command_inspect.clas.xml +0 -16
  39. package/abap/zcl_abgagt_command_preview.clas.abap +0 -386
  40. package/abap/zcl_abgagt_command_preview.clas.xml +0 -15
  41. package/abap/zcl_abgagt_command_pull.clas.abap +0 -80
  42. package/abap/zcl_abgagt_command_pull.clas.testclasses.abap +0 -87
  43. package/abap/zcl_abgagt_command_pull.clas.xml +0 -16
  44. package/abap/zcl_abgagt_command_tree.clas.abap +0 -237
  45. package/abap/zcl_abgagt_command_tree.clas.xml +0 -15
  46. package/abap/zcl_abgagt_command_unit.clas.abap +0 -297
  47. package/abap/zcl_abgagt_command_unit.clas.xml +0 -15
  48. package/abap/zcl_abgagt_command_view.clas.abap +0 -240
  49. package/abap/zcl_abgagt_command_view.clas.xml +0 -15
  50. package/abap/zcl_abgagt_resource_create.clas.abap +0 -71
  51. package/abap/zcl_abgagt_resource_create.clas.xml +0 -15
  52. package/abap/zcl_abgagt_resource_health.clas.abap +0 -25
  53. package/abap/zcl_abgagt_resource_health.clas.xml +0 -15
  54. package/abap/zcl_abgagt_resource_import.clas.abap +0 -66
  55. package/abap/zcl_abgagt_resource_import.clas.xml +0 -15
  56. package/abap/zcl_abgagt_resource_inspect.clas.abap +0 -63
  57. package/abap/zcl_abgagt_resource_inspect.clas.xml +0 -15
  58. package/abap/zcl_abgagt_resource_preview.clas.abap +0 -67
  59. package/abap/zcl_abgagt_resource_preview.clas.xml +0 -15
  60. package/abap/zcl_abgagt_resource_pull.clas.abap +0 -71
  61. package/abap/zcl_abgagt_resource_pull.clas.xml +0 -15
  62. package/abap/zcl_abgagt_resource_tree.clas.abap +0 -70
  63. package/abap/zcl_abgagt_resource_tree.clas.xml +0 -15
  64. package/abap/zcl_abgagt_resource_unit.clas.abap +0 -64
  65. package/abap/zcl_abgagt_resource_unit.clas.xml +0 -15
  66. package/abap/zcl_abgagt_resource_view.clas.abap +0 -68
  67. package/abap/zcl_abgagt_resource_view.clas.xml +0 -15
  68. package/abap/zcl_abgagt_rest_handler.clas.abap +0 -32
  69. package/abap/zcl_abgagt_rest_handler.clas.xml +0 -15
  70. package/abap/zcl_abgagt_util.clas.abap +0 -93
  71. package/abap/zcl_abgagt_util.clas.testclasses.abap +0 -84
  72. package/abap/zcl_abgagt_util.clas.xml +0 -16
  73. package/abap/zcl_abgagt_viewer_clas.clas.abap +0 -58
  74. package/abap/zcl_abgagt_viewer_clas.clas.xml +0 -15
  75. package/abap/zcl_abgagt_viewer_ddls.clas.abap +0 -83
  76. package/abap/zcl_abgagt_viewer_ddls.clas.xml +0 -15
  77. package/abap/zcl_abgagt_viewer_dtel.clas.abap +0 -98
  78. package/abap/zcl_abgagt_viewer_dtel.clas.xml +0 -15
  79. package/abap/zcl_abgagt_viewer_factory.clas.abap +0 -41
  80. package/abap/zcl_abgagt_viewer_factory.clas.xml +0 -15
  81. package/abap/zcl_abgagt_viewer_intf.clas.abap +0 -58
  82. package/abap/zcl_abgagt_viewer_intf.clas.xml +0 -15
  83. package/abap/zcl_abgagt_viewer_stru.clas.abap +0 -59
  84. package/abap/zcl_abgagt_viewer_stru.clas.xml +0 -15
  85. package/abap/zcl_abgagt_viewer_tabl.clas.abap +0 -59
  86. package/abap/zcl_abgagt_viewer_tabl.clas.xml +0 -15
  87. package/abap/zcl_abgagt_viewer_ttyp.clas.abap +0 -93
  88. package/abap/zcl_abgagt_viewer_ttyp.clas.xml +0 -15
  89. package/abap/zif_abgagt_agent.intf.abap +0 -53
  90. package/abap/zif_abgagt_agent.intf.xml +0 -15
  91. package/abap/zif_abgagt_cmd_factory.intf.abap +0 -7
  92. package/abap/zif_abgagt_cmd_factory.intf.xml +0 -15
  93. package/abap/zif_abgagt_command.intf.abap +0 -26
  94. package/abap/zif_abgagt_command.intf.xml +0 -15
  95. package/abap/zif_abgagt_util.intf.abap +0 -28
  96. package/abap/zif_abgagt_util.intf.xml +0 -15
  97. package/abap/zif_abgagt_viewer.intf.abap +0 -12
  98. package/abap/zif_abgagt_viewer.intf.xml +0 -15
  99. package/docs/commands.md +0 -142
  100. package/docs/create-command.md +0 -129
  101. package/docs/health-command.md +0 -89
  102. package/docs/import-command.md +0 -195
  103. package/docs/init-command.md +0 -189
  104. package/docs/inspect-command.md +0 -169
  105. package/docs/list-command.md +0 -289
  106. package/docs/preview-command.md +0 -528
  107. package/docs/pull-command.md +0 -202
  108. package/docs/status-command.md +0 -68
  109. package/docs/tree-command.md +0 -303
  110. package/docs/unit-command.md +0 -167
  111. package/docs/view-command.md +0 -501
  112. package/img/claude.png +0 -0
  113. package/scripts/claude-integration.js +0 -351
  114. package/scripts/release.js +0 -298
  115. package/scripts/release.sh +0 -60
  116. package/scripts/test-integration.js +0 -139
  117. package/scripts/unrelease.js +0 -277
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
3
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4
- <asx:values>
5
- <VSEOINTERF>
6
- <CLSNAME>ZIF_ABGAGT_CMD_FACTORY</CLSNAME>
7
- <LANGU>E</LANGU>
8
- <DESCRIPT>Command Factory Interface for ABAP Git Agent</DESCRIPT>
9
- <EXPOSURE>2</EXPOSURE>
10
- <STATE>1</STATE>
11
- <UNICODE>X</UNICODE>
12
- </VSEOINTERF>
13
- </asx:values>
14
- </asx:abap>
15
- </abapGit>
@@ -1,26 +0,0 @@
1
- "* Use this source text module for the interface definition
2
- "! <p class="shorttext synchronized">Command Interface for ABAP Git Agent</p>
3
- INTERFACE zif_abgagt_command PUBLIC.
4
-
5
- CONSTANTS:
6
- gc_pull TYPE string VALUE 'PULL',
7
- gc_inspect TYPE string VALUE 'INSPECT',
8
- gc_unit TYPE string VALUE 'UNIT',
9
- gc_create TYPE string VALUE 'CREATE',
10
- gc_import TYPE string VALUE 'IMPORT',
11
- gc_tree TYPE string VALUE 'TREE',
12
- gc_view TYPE string VALUE 'VIEW',
13
- gc_preview TYPE string VALUE 'PREVIEW'.
14
-
15
- " Get command name
16
- METHODS get_name
17
- RETURNING VALUE(rv_name) TYPE string.
18
-
19
- " Execute command with optional parameters
20
- " @parameter is_param | Generic parameters (structure varies by command)
21
- " @parameter rv_result | JSON result string
22
- METHODS execute
23
- IMPORTING is_param TYPE data OPTIONAL
24
- RETURNING VALUE(rv_result) TYPE string.
25
-
26
- ENDINTERFACE.
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
3
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4
- <asx:values>
5
- <VSEOINTERF>
6
- <CLSNAME>ZIF_ABGAGT_COMMAND</CLSNAME>
7
- <LANGU>E</LANGU>
8
- <DESCRIPT>Command Interface for ABAP Git Agent</DESCRIPT>
9
- <EXPOSURE>2</EXPOSURE>
10
- <STATE>1</STATE>
11
- <UNICODE>X</UNICODE>
12
- </VSEOINTERF>
13
- </asx:values>
14
- </asx:abap>
15
- </abapGit>
@@ -1,28 +0,0 @@
1
- "* Use this source text module for the interface definition
2
- "! <p class="shorttext synchronized">Utility Interface for ABAP Git Agent</p>
3
- INTERFACE zif_abgagt_util PUBLIC.
4
-
5
- "! Parse file name to extract object type and name
6
- "! @parameter iv_file | File name (e.g., 'zcl_my_class.clas.abap')
7
- "! @parameter ev_obj_type | Object type (e.g., 'CLAS')
8
- "! @parameter ev_obj_name | Object name (e.g., 'ZCL_MY_CLASS')
9
- METHODS parse_file_to_object
10
- IMPORTING
11
- iv_file TYPE string
12
- EXPORTING
13
- ev_obj_type TYPE string
14
- ev_obj_name TYPE string.
15
-
16
- "! Check activation log for errors
17
- "! @return rv_has_error | ABAP_TRUE if errors found
18
- METHODS check_log_for_errors
19
- RETURNING
20
- VALUE(rv_has_error) TYPE abap_bool.
21
-
22
- "! Get detailed log information
23
- "! @return rv_detail | Detailed log message
24
- METHODS get_log_detail
25
- RETURNING
26
- VALUE(rv_detail) TYPE string.
27
-
28
- ENDINTERFACE.
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
3
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4
- <asx:values>
5
- <VSEOINTERF>
6
- <CLSNAME>ZIF_ABGAGT_UTIL</CLSNAME>
7
- <LANGU>E</LANGU>
8
- <DESCRIPT>Utility Interface for ABAP Git Agent</DESCRIPT>
9
- <EXPOSURE>2</EXPOSURE>
10
- <STATE>1</STATE>
11
- <UNICODE>X</UNICODE>
12
- </VSEOINTERF>
13
- </asx:values>
14
- </asx:abap>
15
- </abapGit>
@@ -1,12 +0,0 @@
1
- *"* Use this source text module for the interface definition
2
- INTERFACE zif_abgagt_viewer PUBLIC.
3
-
4
- " Get detailed information about an ABAP object
5
- " @parameter iv_name | Object name (e.g., ZCL_MY_CLASS)
6
- " @parameter rs_info | Object information structure
7
- METHODS get_info
8
- IMPORTING iv_name TYPE string
9
- RETURNING VALUE(rs_info) TYPE zcl_abgagt_command_view=>ty_view_object
10
- RAISING cx_dd_ddl_read.
11
-
12
- ENDINTERFACE.
@@ -1,15 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <abapGit version="v1.0.0" serializer="LCL_OBJECT_INTF" serializer_version="v1.0.0">
3
- <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
4
- <asx:values>
5
- <VSEOINTERF>
6
- <CLSNAME>ZIF_ABGAGT_VIEWER</CLSNAME>
7
- <LANGU>E</LANGU>
8
- <DESCRIPT>Viewer Interface for ABAP Object Types</DESCRIPT>
9
- <EXPOSURE>2</EXPOSURE>
10
- <STATE>1</STATE>
11
- <UNICODE>X</UNICODE>
12
- </VSEOINTERF>
13
- </asx:values>
14
- </asx:abap>
15
- </abapGit>
package/docs/commands.md DELETED
@@ -1,142 +0,0 @@
1
- # Commands Overview
2
-
3
- All available CLI commands for abapGit Agent.
4
-
5
- ## Command Reference
6
-
7
- | Command | Status | Description |
8
- |---------|--------|-------------|
9
- | [init](init-command.md) | ✅ | Initialize local configuration |
10
- | [create](create-command.md) | ✅ | Create online repository in ABAP |
11
- | [import](import-command.md) | ✅ | Import objects from ABAP package to git |
12
- | [pull](pull-command.md) | ✅ | Pull and activate objects in ABAP |
13
- | [inspect](inspect-command.md) | ✅ | Syntax check ABAP source files |
14
- | [tree](tree-command.md) | ✅ | Display package hierarchy tree |
15
- | [unit](unit-command.md) | ✅ | Run AUnit tests |
16
- | [view](view-command.md) | ✅ | View ABAP object source code from system |
17
- | [preview](preview-command.md) | 🔄 | Preview table/CDS view data |
18
- | [health](health-command.md) | ✅ | Health check |
19
- | [status](status-command.md) | ✅ | Status check |
20
-
21
- ---
22
-
23
- ## Quick Start
24
-
25
- ### New Project Setup
26
-
27
- ```bash
28
- # 1. Initialize local configuration
29
- abapgit-agent init --folder /src/ --package ZMY_PACKAGE
30
-
31
- # 2. Edit .abapGitAgent with credentials
32
- vim .abapGitAgent
33
-
34
- # 3. Commit and push new files to git
35
- git add . && git commit -m "Initial commit" && git push origin main
36
-
37
- # 4. Create online repository in ABAP
38
- abapgit-agent create
39
-
40
- # 5. Import objects from ABAP package to git
41
- abapgit-agent import
42
-
43
- # 6. Pull new objects imported from ABAP package
44
- git pull origin main
45
-
46
- # 7. Activate in ABAP
47
- abapgit-agent pull
48
- ```
49
-
50
- ---
51
-
52
- ## Daily Development
53
-
54
- ```bash
55
- # Pull changes from git and activate in ABAP (auto-detects git remote)
56
- abapgit-agent pull
57
-
58
- # Pull specific files only (faster for small changes)
59
- abapgit-agent pull --files abap/zcl_my_class.clas.abap
60
-
61
- # Syntax check before commit
62
- abapgit-agent inspect --files abap/zcl_my_class.clas.abap
63
-
64
- # Run unit tests
65
- abapgit-agent unit --files abap/zcl_my_test.clas.testclasses.abap
66
-
67
- # Display package hierarchy
68
- abapgit-agent tree --package $MY_PACKAGE
69
-
70
- # View object definitions (classes, interfaces, tables, data elements)
71
- abapgit-agent view --objects ZCL_MY_CLASS
72
- abapgit-agent view --objects SFLIGHT --type TABL
73
-
74
- # Preview table/CDS view data
75
- abapgit-agent preview --objects SFLIGHT
76
- abapgit-agent preview --objects ZC_MY_CDS_VIEW --type DDLS
77
-
78
- # Check configuration
79
- abapgit-agent status
80
-
81
- # Verify ABAP connection
82
- abapgit-agent health
83
- ```
84
-
85
- ---
86
-
87
- ## Command Workflow
88
-
89
- ```
90
- ┌─────────────────────────────────────────────────┐
91
- │ init │
92
- │ └── Creates .abapGitAgent, CLAUDE.md, /src/ │
93
- └─────────────────────────────────────────────────┘
94
-
95
-
96
- ┌─────────────────────────────────────────────────┐
97
- │ git add && git commit && git push │
98
- │ └── Push initial files to git │
99
- └─────────────────────────────────────────────────┘
100
-
101
-
102
- ┌─────────────────────────────────────────────────┐
103
- │ create │
104
- │ └── Creates online repo in ABAP │
105
- └─────────────────────────────────────────────────┘
106
-
107
-
108
- ┌─────────────────────────────────────────────────┐
109
- │ import │
110
- │ └── Stages, commits, pushes objects to git │
111
- └─────────────────────────────────────────────────┘
112
-
113
-
114
- ┌─────────────────────────────────────────────────┐
115
- │ git pull │
116
- │ └── Pull imported objects from ABAP package │
117
- └─────────────────────────────────────────────────┘
118
-
119
-
120
- ┌─────────────────────────────────────────────────┐
121
- │ pull │
122
- │ └── Activates objects in ABAP │
123
- └─────────────────────────────────────────────────┘
124
- ```
125
-
126
- ---
127
-
128
- ## Common Options
129
-
130
- ### Global Parameters
131
-
132
- All commands read configuration from:
133
- - `.abapGitAgent` file in current directory
134
- - Environment variables (`ABAP_HOST`, `ABAP_USER`, etc.)
135
-
136
- ### File Patterns
137
-
138
- | Pattern | Description |
139
- |---------|-------------|
140
- | `zcl_my_class.clas.abap` | ABAP class source |
141
- | `zif_my_intf.intf.abap` | ABAP interface source |
142
- | `zcl_my_test.clas.testclasses.abap` | ABAP test class |
@@ -1,129 +0,0 @@
1
- # create Command
2
-
3
- Create a new abapGit online repository in the ABAP system.
4
-
5
- ## Command
6
-
7
- ```bash
8
- abapgit-agent create
9
- ```
10
-
11
- ## Prerequisite
12
-
13
- - `init` command has been run successfully
14
- - `.abapGitAgent` file exists with credentials (host, user, password, gitUsername, gitPassword)
15
- - Current folder is git repo root
16
-
17
- ## What It Does
18
-
19
- 1. **Detect git remote** - Gets URL from `git remote get-url origin`
20
- 2. **Get package** - Reads from `.abapGitAgent`
21
- 3. **Get folder** - Reads from `.abapGitAgent` (default: `/src/`)
22
- 4. **Create repository** - Calls ABAP REST API to create online repository
23
- 5. **Set starting folder** - Configures the folder path in repository settings
24
-
25
- ## Parameters
26
-
27
- None. The command auto-detects all settings from:
28
- - Git remote URL
29
- - `.abapGitAgent` configuration
30
-
31
- ## Output
32
-
33
- ### Success
34
-
35
- ```
36
- 🚀 Creating online repository
37
- URL: https://github.com/org/repo.git
38
- Package: AUD_TAG
39
- Folder: /abap/
40
- Name: abgagt-import
41
- Branch: main
42
-
43
-
44
- ✅ Repository created successfully!
45
- URL: https://github.com/org/repo.git
46
- Package: AUD_TAG
47
- Name: abgagt-import
48
-
49
- Next steps:
50
- abapgit-agent import
51
- ```
52
-
53
- ### Error - Repository Already Exists
54
-
55
- ```
56
- ❌ Failed to create repository
57
- Error: Repository already exists
58
- ```
59
-
60
- ### Error - Missing Configuration
61
-
62
- ```
63
- ❌ Failed to create repository
64
- Error: Package not configured
65
- ```
66
-
67
- ## Post-Create Steps
68
-
69
- After creating the repository:
70
-
71
- ```bash
72
- # Import objects from ABAP package to git
73
- abapgit-agent import
74
-
75
- # Push to git
76
- git push origin main
77
-
78
- # Activate in ABAP
79
- abapgit-agent pull
80
- ```
81
-
82
- ## Full Workflow
83
-
84
- ```
85
- 1. abapgit-agent init --folder /src/ --package ZMY_PACKAGE
86
- └─> Creates .abapGitAgent, CLAUDE.md, /src/, updates .gitignore
87
-
88
- 2. Edit .abapGitAgent (host, user, password, gitUsername, gitPassword)
89
-
90
- 3. abapgit-agent create
91
- └─> Creates online repository in ABAP
92
-
93
- 4. abapgit-agent import
94
- └─> Stages, commits, and pushes all objects from ZMY_PACKAGE
95
-
96
- 5. git pull
97
- └─> Optionally pull to local folder
98
-
99
- 6. abapgit-agent pull
100
- └─> Activate objects in ABAP
101
- ```
102
-
103
- ## Example
104
-
105
- ```bash
106
- # Initialize
107
- abapgit-agent init --folder /src/ --package ZMYPROJECT
108
-
109
- # Edit config
110
- vim .abapGitAgent
111
-
112
- # Create repo in ABAP
113
- abapgit-agent create
114
-
115
- # Import objects to git
116
- abapgit-agent import
117
-
118
- # Pull to local folder
119
- git pull origin main
120
-
121
- # Activate in ABAP
122
- abapgit-agent pull
123
- ```
124
-
125
- ## Related Commands
126
-
127
- - [`init`](init-command.md) - Initialize local configuration
128
- - [`import`](import-command.md) - Import objects from package to git
129
- - [`pull`](pull-command.md) - Pull and activate objects in ABAP
@@ -1,89 +0,0 @@
1
- # health Command Requirements
2
-
3
- ## Overview
4
-
5
- Check if the ABAP REST API is healthy and accessible.
6
-
7
- ## Command
8
-
9
- ```bash
10
- abapgit-agent health
11
- ```
12
-
13
- ## Prerequisite
14
-
15
- - `.abapGitAgent` file exists with valid credentials, or environment variables are set
16
-
17
- ## Tasks
18
-
19
- ### 1. Load Configuration
20
-
21
- Read from `.abapGitAgent` or environment variables:
22
- - `host`
23
- - `sapport`
24
- - `client`
25
- - `user`
26
- - `password`
27
- - `language`
28
-
29
- ### 2. Make Health Check Request
30
-
31
- **Endpoint:** `GET /health`
32
-
33
- **Response:**
34
- ```json
35
- {
36
- "status": "healthy",
37
- "abap": "connected",
38
- "version": "1.0.0"
39
- }
40
- ```
41
-
42
- ### 3. Display Result
43
-
44
- ```bash
45
- $ abapgit-agent health
46
- {
47
- "status": "healthy",
48
- "abap": "connected",
49
- "version": "1.0.0"
50
- }
51
- ```
52
-
53
- ---
54
-
55
- ## Output
56
-
57
- | Status | Output |
58
- |--------|--------|
59
- | Healthy | JSON response with status |
60
- | Error | Error message with details |
61
-
62
- ---
63
-
64
- ## Error Handling
65
-
66
- | Error | Message |
67
- |-------|---------|
68
- | Connection failed | `Health check failed: <error message>` |
69
- | Invalid credentials | Authentication error |
70
-
71
- ---
72
-
73
- ## Example
74
-
75
- ```bash
76
- # Check health
77
- abapgit-agent health
78
-
79
- # Output
80
- {
81
- "status": "healthy",
82
- "abap": "connected",
83
- "version": "1.0.0"
84
- }
85
- ```
86
-
87
- ## Used By
88
-
89
- - `create` command - validates ABAP connection before creating repo
@@ -1,195 +0,0 @@
1
- # import Command
2
-
3
- Import existing ABAP objects from a package into an existing abapGit online repository.
4
-
5
- ## Command
6
-
7
- ```bash
8
- abapgit-agent import
9
- abapgit-agent import --message "Your commit message"
10
- ```
11
-
12
- ## Prerequisites
13
-
14
- - Repository already exists in ABAP (created via abapGit UI or `create` command)
15
- - Package has objects to import
16
- - GitHub credentials configured in `.abapGitAgent`
17
-
18
- ## Parameters
19
-
20
- | Parameter | Required | Default | Description |
21
- |-----------|----------|---------|-------------|
22
- | `--message` | No | `feat: initial import from ABAP package <package>` | Commit message |
23
- | `--help` | No | - | Show help |
24
-
25
- ## Configuration
26
-
27
- ### .abapGitAgent
28
-
29
- Add GitHub credentials to `.abapGitAgent`:
30
-
31
- ```json
32
- {
33
- "gitUsername": "<your-github-username>",
34
- "gitPassword": "ghp_your_github_token"
35
- }
36
- ```
37
-
38
- ### Environment Variables
39
-
40
- ```bash
41
- export GIT_USERNAME="<your-github-username>"
42
- export GIT_PASSWORD="ghp_your_github_token"
43
- ```
44
-
45
- ### GitHub Personal Access Token
46
-
47
- 1. Create a PAT at:
48
- - GitHub.com: https://github.com/settings/tokens
49
-
50
- 2. Select scopes:
51
- - `repo` - Full control of private repositories
52
- - Or `public_repo` if your repo is public
53
-
54
- ## How It Works
55
-
56
- 1. **Validate** - Check repository URL exists
57
- 2. **Find Repo** - Locate abapGit repository by git URL
58
- 3. **Configure Credentials** - Set git credentials from config
59
- 4. **Refresh** - Get latest local files from package
60
- 5. **Stage** - Create stage with all files
61
- 6. **Commit** - Commit with message
62
- 7. **Push** - Push to remote
63
-
64
- ## Workflow
65
-
66
- ### Full Development Cycle
67
-
68
- ```
69
- 1. Develop in ABAP (SAP GUI, ADT)
70
- └─> Create/modify objects in package
71
-
72
- 2. abapgit-agent import
73
- └─> Stages, commits, and pushes to git
74
-
75
- 3. git pull (optional, in local repo)
76
- └─> Get files to local folder
77
-
78
- 4. Repeat
79
- ```
80
-
81
- ## Output
82
-
83
- ### Success
84
-
85
- ```
86
- ✅ Objects imported successfully!
87
- Files staged: 27
88
- Commit: feat: initial import from ABAP package AUD_TAG
89
- ```
90
-
91
- ### With Custom Message
92
-
93
- ```
94
- ✅ Objects imported successfully!
95
- Files staged: 15
96
- Commit: My custom import message
97
- ```
98
-
99
- ### Error - Repository Not Found
100
-
101
- ```
102
- ❌ Import failed
103
- Error: Repository not found. Run "abapgit-agent create" or create in abapGit UI first.
104
- ```
105
-
106
- ### Error - No Objects Found
107
-
108
- ```
109
- ❌ Import failed
110
- Error: No objects found in package ZMY_PACKAGE
111
- ```
112
-
113
- ### Error - GitHub Credentials
114
-
115
- ```
116
- ❌ Import failed
117
- Error: Unauthorized access to resource (HTTP 401)
118
- ```
119
-
120
- ## Troubleshooting
121
-
122
- ### HTTP 401 Unauthorized
123
-
124
- GitHub credentials not configured or invalid:
125
-
126
- 1. Create a GitHub Personal Access Token
127
- 2. Add to `.abapGitAgent`:
128
-
129
- ```json
130
- {
131
- "gitUsername": "<your-github-username>",
132
- "gitPassword": "ghp_your_token"
133
- }
134
- ```
135
-
136
- ### Repository Not Found
137
-
138
- The repository must exist in abapGit:
139
-
140
- 1. Run `abapgit-agent create` to create it, OR
141
- 2. Create manually in abapGit UI: https://<sap>/sap/bc/zabapgit
142
-
143
- ### No Objects Found
144
-
145
- The package may be empty or objects not yet created:
146
-
147
- 1. Verify package in SAP GUI: `SE21` → Display Package
148
- 2. Ensure objects exist in the package
149
-
150
- ## Full Workflow
151
-
152
- ### Option 1: abapgit-agent (Recommended)
153
-
154
- ```bash
155
- # Initialize
156
- abapgit-agent init --folder /abap --package ZMYPROJECT
157
-
158
- # Edit config
159
- vim .abapGitAgent
160
-
161
- # Create repository
162
- abapgit-agent create
163
-
164
- # Develop objects in ABAP...
165
-
166
- # Import objects to git
167
- abapgit-agent import
168
-
169
- # Pull to local folder
170
- git pull origin main
171
- ```
172
-
173
- ### Option 2: abapGit UI for Creation
174
-
175
- ```bash
176
- # Initialize
177
- abapgit-agent init --folder /abap --package ZMYPROJECT
178
-
179
- # Edit config
180
- vim .abapGitAgent
181
-
182
- # Create repository in abapGit UI
183
- # https://<sap>/sap/bc/zabapgit → New → Online → Enter git URL
184
-
185
- # Develop objects in ABAP...
186
-
187
- # Import objects to git
188
- abapgit-agent import
189
- ```
190
-
191
- ## Related Commands
192
-
193
- - [`init`](init-command.md) - Initialize local configuration
194
- - [`create`](create-command.md) - Create online repository in ABAP
195
- - [`pull`](pull-command.md) - Pull and activate objects in ABAP