Skip to content

Commit b58b035

Browse files
Update README.md
Signed-off-by: Mahendra <[email protected]>
1 parent cabedc9 commit b58b035

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,14 @@ Active communication channels
169169
## License
170170

171171
Refer the licence - [LICENCE](./LICENSE).
172+
173+
## Star History
174+
175+
<a href="https://star-history.com/#intelops/compage&Timeline">
176+
<picture>
177+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=intelops/compage&type=Date&theme=dark" />
178+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=intelops/compage&type=Date" />
179+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=intelops/compage&type=Date" />
180+
</picture>
181+
</a>
182+

app/src/integrations/simple-git/common.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,22 @@ export const gitOperations = async (git: SimpleGit, repositoryBranch?: string, p
4242
branchName = repositoryBranch + '-' + projectVersion;
4343
}
4444

45-
// checkoutLocalBranch checks out local branch with name supplied
46-
await git.checkoutLocalBranch(branchName)
47-
.then(
48-
(success: any) => {
49-
Logger.debug(`git checkoutLocalBranch succeeded: ${JSON.stringify(success)}`);
50-
}, (failure: any) => {
51-
Logger.debug(`git checkoutLocalBranch failed: ${JSON.stringify(failure)}`);
52-
error = `git checkoutLocalBranch failed: ${JSON.stringify(failure)}`;
53-
});
54-
if (error.length > 0) {
55-
return error;
45+
const branchSummary = await git.branch();
46+
const isBranchPresent = branchSummary?.branches[branchName];
47+
if (!isBranchPresent) {
48+
// checkoutLocalBranch checks out local branch with name supplied
49+
await git.checkoutLocalBranch(branchName)
50+
.then(
51+
(success: any) => {
52+
Logger.debug(`git checkoutLocalBranch succeeded: ${JSON.stringify(success)}`);
53+
}, (failure: any) => {
54+
Logger.debug(`git checkoutLocalBranch failed: ${JSON.stringify(failure)}`);
55+
error = `git checkoutLocalBranch failed: ${JSON.stringify(failure)}`;
56+
});
57+
if (error.length > 0) {
58+
return error;
59+
}
5660
}
57-
5861
// Finally, push to online repository
5962
await git.push('origin', branchName, {'--force': null})
6063
.then((success: any) => {

core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- It's a Golang based gRPC server to app component.
55

66
#### How to run this component?
7-
- Navigate to core directory [cd app] from root directory of compage.
7+
- Navigate to core directory [cd core] from root directory of compage.
88
- Fire below set of commands in sequence to initialize the git submodules.
99
- `git submodule init`
1010
- `git submodule update --remote`

core/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ var (
2626

2727
func main() {
2828
// grpc server configuration
29-
// Initialize the exporter
29+
// Initializes the exporter
3030
var grpcTraceProvider *sdktrace.TracerProvider
3131
if len(serviceName) > 0 && len(collectorURL) > 0 {
32-
// add opentel
32+
// add open telemetry tracing
3333
grpcTraceProvider = config.InitGrpcTracer(serviceName, collectorURL, insecure)
3434
}
3535
defer func() {

0 commit comments

Comments
 (0)