This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './App.css'; | |
import React, {useState, useEffect } from 'react'; | |
import { PingPongClient } from './proto/service_grpc_web_pb'; | |
import { PingRequest } from './proto/service_pb'; | |
// We create a client that connects to the api | |
var client = new PingPongClient("https://localhost:8080"); | |
function App() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[req] | |
default_bits = 4096 | |
prompt = no | |
default_md = sha256 | |
req_extensions = req_ext | |
distinguished_name = dn | |
[dn] | |
C = US | |
ST = NJ | |
O = Test, Inc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"net" | |
"net/http" | |
"time" | |
"embed" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path := os.Args[1] | |
r, err := git.PlainOpen(path) | |
if err != nil { | |
log.Fatal("Error opening Repository: ", err) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PlainOpen opens a git repository from the given path. It detects if the | |
// repository is bare or a normal one. If the path doesn't contain a valid | |
// repository ErrRepositoryNotExists is returned | |
func PlainOpen(path string) (*Repository, error) { | |
return PlainOpenWithOptions(path, &PlainOpenOptions{}) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path string | |
// Read user input | |
flag.StringVar(&path, "path", "", "A filepath to a folder containing a github repository") | |
// Parse Flags | |
flag.Parse() | |
// Make sure user has inserted the needed flags | |
if path == "" { | |
flag.Usage() | |
os.Exit(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r, err := git.PlainOpen(path) | |
if err != nil { | |
log.Fatal("Error opening Repository: ", err) | |
} | |
ref, err := r.Head() | |
if err != nil { | |
log.Fatal("Unable to get repository HEAD:", err) | |
} | |
cIter, err := r.Log(&git.LogOptions{From: ref.Hash()}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Repository is a struct that holds an Opened github repository and the reference | |
type Repository struct { | |
path string | |
repo *git.Repository | |
ref *plumbing.Reference | |
} | |
// Open will open up a git repository | |
// and load the Head reference |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logContainer := new(logcategory.LogsByCategory) | |
latestTag, _, err := utils.GetLatestTagFromRepository(repo.repo) | |
if err != nil { | |
log.Fatal("Error Getting Tag Pairs", err) | |
} | |
tillLatest := false | |
if latestTag != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GetLatestTag is used to check the latestTag | |
// it will return a reference to the LatestTag and the PreviousTag | |
func (r *Repository) GetLatestTag() (*plumbing.Reference, *plumbing.Reference, error) { | |
tagRefs, err := r.repo.Tags() | |
if err != nil { | |
return nil, nil, err | |
} | |
var latestTagCommit *object.Commit | |
var latestTagName *plumbing.Reference |