Skip to content

Commit 4c8db7f

Browse files
committed
Add A-Hilaly report
1 parent 25f34e1 commit 4c8db7f

File tree

1 file changed

+178
-0
lines changed

1 file changed

+178
-0
lines changed

_reports/A-Hilaly.md

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
categories:
3+
- GSoC
4+
- 2019
5+
- StatusReport
6+
date: 2019-08-25
7+
student: Mohammed Amine Hilaly
8+
organisation: coala
9+
organisation_link : https://coala.io
10+
project: git-bug Github and Gitlab bidirectional syncing
11+
project_link: https://summerofcode.withgoogle.com/dashboard/project/6390539212029952
12+
tarball: https://github.com/A-Hilaly/gsoc-report/raw/master/a-hilaly.tar.gz
13+
sha256sum: d0dc2fc5a78d5c1fa173eac6b83961e5fc913493b7a3f880c3880f89b8140360
14+
mentors: >
15+
[Michael Muré](https://github.com/MichaelMure)
16+
phase:
17+
- Bonding : https://github.com/MichaelMure/git-bug/milestone/1
18+
- Phase 1 : https://github.com/MichaelMure/git-bug/milestone/2
19+
- Phase 2 : https://github.com/MichaelMure/git-bug/milestone/3
20+
- Phase 3 : https://github.com/MichaelMure/git-bug/milestone/4
21+
bio: >
22+
I'm a final year student of Computer Science at SUPINFO International
23+
school, Strasbourg. I worked during the summer implementing Github and
24+
Gitlab bidirectional syncing for the git-bug project. I also worked on
25+
adding features to the code base and improving other existing components
26+
and the user interface.
27+
28+
social:
29+
- GitHub:
30+
- username: A-Hilaly
31+
- link: https://github.com/A-Hilaly
32+
- GitLab:
33+
- username: A-Hilaly
34+
- link: https://gitlab.com/A-Hilaly
35+
- Gitter:
36+
- username: A-Hilaly
37+
- link: https://gitter.im/A-Hilaly
38+
39+
40+
blog: https://medium.com/@aminedotin
41+
activity:
42+
- 0:
43+
- repo: git-bug
44+
- link: https://github.com/MichaelMure/git-bug/pull/117
45+
- details: >
46+
Add particpants and actors functionalities
47+
- 1:
48+
- repo: git-bug
49+
- link: https://github.com/MichaelMure/git-bug/pull/121
50+
- details: >
51+
Query identities by a full ID or truncated ID
52+
- 2:
53+
- repo: git-bug
54+
- link: https://github.com/MichaelMure/git-bug/pull/122
55+
- details: >
56+
Filter issues by participants and actors
57+
- 3:
58+
- repo: git-bug
59+
- link: https://github.com/MichaelMure/git-bug/pull/131
60+
- details: >
61+
Implement a Github iterator and add end to end tests for its importer
62+
63+
- 4:
64+
- repo: git-bug
65+
- link: https://github.com/MichaelMure/git-bug/pull/135
66+
- details: >
67+
Enhancements to the Github importer and add import statistics
68+
Support bridge configuration using flags
69+
- 5:
70+
- repo: git-bug
71+
- link: https://github.com/MichaelMure/git-bug/pull/151
72+
- details: >
73+
Support bridge configuration using flags
74+
- 6:
75+
- repo: git-bug
76+
- link: https://github.com/MichaelMure/git-bug/pull/156
77+
- details: >
78+
fix bridge rm command
79+
- 7:
80+
- repo: git-bug
81+
- link: https://github.com/MichaelMure/git-bug/pull/162
82+
- details: >
83+
improve bridges listing functionality
84+
- 8:
85+
- repo: git-bug
86+
- link: https://github.com/MichaelMure/git-bug/pull/166
87+
- details: >
88+
Implemented a github exporter
89+
- 9:
90+
- repo: git-bug
91+
- link: https://github.com/MichaelMure/git-bug/pull/170
92+
- details: >
93+
store the bridge target name with the configuration
94+
- 10:
95+
- repo: git-bug
96+
- link: https://github.com/MichaelMure/git-bug/pull/177
97+
- details: >
98+
improve git bug bridge rm command
99+
- 11:
100+
- repo: git-bug
101+
- link: https://github.com/MichaelMure/git-bug/pull/179
102+
- details: >
103+
Add Gitlab importer and bridge configuration
104+
- 12:
105+
- repo: git-bug
106+
- link: https://github.com/MichaelMure/git-bug/pull/187
107+
- details: >
108+
Add Gitlab exporter
109+
- 13:
110+
- repo: git-bug
111+
- link: https://github.com/MichaelMure/git-bug/pull/190
112+
- details: >
113+
Support graceful shutdown in import and export operations
114+
- 14:
115+
- repo: git-bug
116+
- link: https://github.com/MichaelMure/git-bug/pull/192
117+
- details: >
118+
Support case sensitive labels when trying to export bugs
119+
120+
---
121+
# Support bidirectional syncing with Github and Gitlab
122+
123+
#### Work Done
124+
125+
1. Both of the GitHub and Gitlab bridges are now operational, and can be used for bidirectional syncing with private and public repositories
126+
127+
2. The GitHub and Gitlab bridges both have an iterator that helps decoupling the import logic from the requests made to the apis
128+
129+
3. git-bug bridges can be configured using interactive shell mode or by passing all necessary informations by flags
130+
131+
4. GitHub bridge configuration can now generate tokens with the minimal needed scopes to interact with public and private repositories
132+
133+
5. The bridges push and pull commands now support graceful shutdown and can be safely interrupted.
134+
135+
6. The Github and Gitlab bridges have end to end testing for importing and exporting issues
136+
137+
#### Challenges
138+
139+
The biggest challenge for me was trying to ensure that the importers and exporters worked correctly even after running successive imports/exports with different bridges. This implicated writing efficient end to end tests for the Github and Gitlab bridges.
140+
141+
Another challenge was studying the Github and Gitlab API since each one of them has its own way to read and write issues.
142+
143+
On one hand the project wasn't difficult, git-bug, Github, Gitlab provided good documentations over all which helped me to implement the core functionalities.
144+
On the other hand the project wasn't easy, i have encountred so many edges cases that needed trickier implementations and more deep testing.
145+
146+
#### What i have learned
147+
148+
The GSoC experience helped me improve at many different levels especially in the Go programming language and software engineering in general.
149+
I've learned many things during this project, most importantly code quality and readability for Golang projects. My mentor reviewed my Pull Requests in a regular basis which led me to write a maintainable, better quality and well tested code.
150+
151+
I've also learned good practices about writing unit tests and end to end tests, using and building GraphQL apis with Go, concurrency patterns and process cancellation.
152+
153+
#### Work to be done
154+
155+
- import and export only issues created or updated after a certain date and time. This would be very usefull to improve the import and export time for repositories containing a lot of issues
156+
157+
- support importing and exporting media files included in issues and comments
158+
159+
- Implementing a global bridge configuration to share one token for multiple repositories instead of storing a token with each configured bridge
160+
161+
- Implementing more bridges (bugilla, gitea ...)
162+
163+
- since the Github and the Gitlab exporters are very similar it would be nice to try to have one general exporter that consumes objects providing methods to write to the API directly
164+
165+
For example trying to implement the IssueProvider for all the bridges
166+
```golang
167+
type IssuesProvider interface {
168+
CreateIssue(title, body string) (issueID string, err error)
169+
EditIssueBody(issueID, body string) (err error)
170+
EditIssueTitle(issueID, title string) (err error)
171+
EditIssueStatus(issueID, status bug.Status) (err error)
172+
EditIssueLabels(issueID, labels []bug.Label) (err error)
173+
CreateComment(issueID, body string) (commentID string, err error)
174+
EditComment(issueID, commentID, body string) error
175+
}
176+
```
177+
178+
this way we can simplify the process of implementing the exporters for the new bridges

0 commit comments

Comments
 (0)