purpleclay / gitz Goto Github PK
View Code? Open in Web Editor NEWWrite fluent interactions to Git. Programmatically crafting git commands becomes a breeze!
Home Page: https://docs.purpleclay.dev/gitz/
License: MIT License
Write fluent interactions to Git. Programmatically crafting git commands becomes a breeze!
Home Page: https://docs.purpleclay.dev/gitz/
License: MIT License
Git push options were added to support the arbitrary pushing of strings to the git server. CI providers such as GitLab have leveraged this functionality to support dynamic CI configurations during a push. Add this support to gitz
to improve the library's versatility.
No response
Reinstate support for automatically merging a dependabot pull request that has passed all its status checks. Ensure no other workflow is run by excluding dependabot through if
clauses.
Introduce a new Tags
command to return a raw list of local repository tags. Options should be supported for filtering tags by any custom convention and sorting them by a given order. It might be worthwhile including custom options that impose a predefined type of sort, for example, a semantic versioning sort
No response
Expand the details returned by the Repository()
method to include all remotes currently configured for the current repository. These will be raw strings.
No response
Current code examples within the documentation are in a pseudo-format and won't compile, let alone run, if copied and pasted. Ensure these samples are updated so that they are runnable.
It would also be worth extracting these samples into a dedicated examples directory. These should be compiled and run to ensure no failures are reported.
Currently, the Log()
function will return the log as a raw string that requires further processing by the caller. To improve the developer experience, the log should be accompanied by a slice of parsed log entries. If callers want just the raw output, they should supply the WithRawOnly()
option, reducing the processing required.
No response
Create a custom error that is returned whenever a git operation fails. This error should provide context about the function in question and the plain error and status code returned by the underlying git client. In future, this error can contain links to documentation for faster resolution for users.
No response
Allow details about a specific commit and tag to be retrieved by using the git show
command.
No response
Create a new dedicated workflow for dependency scanning. Introduce advisory support for the new govulncheck
tool.
Include a new git stage option that adds all outstanding files ready for a commit. This removes the need to specify each file in turn if many changes have been made.
No response
Support the option of post-processing the list of retrieved tags through a user-defined filter function func(string) bool
. This should be exposed through a new option WithFilters
.
No response
Add a section to the documentation that explains how gitz
checks for the existence of a git client.
Include support for the signing of commits and tags within gitz
. This can be enabled through git config and on an ad-hoc basis. Also include support for skipping signing of particular commits and tags.
No response
gitz
provides basic clone functionality and pulls the entire working tree from the remote. This can be slow for large repositories and unnecessary in certain conditions. Define a set of options that allows the cloning process only to pull what is needed:
No response
Extend existing git log support to filter commits using regular expression patterns. The git client provides this option through the --grep
flag. The --invert-grep
flag should also be supported to inverse the filtering.
No response
It is recommended to configure a New Code Defintion
within SonarCloud. In particular, on the creation of a new version. SonarCloud does not currently run as part of a tagged build within the existing base CI workflow. To support this functionality, the sonar-project.properties
file will need to be dynamically patched with the tag reference.
Write documentation for the upcoming 0.5.0
release of gitz
. This should include the following:
Add support for the git log flag -n<number>
, which allows the git log to be restricted to a maximum number of commits.
No response
Introduce a new Config
command that supports the setting of local git config values. Ensure a map of constants exists for easy setting lookup.
Another command should also exist for retrieving the entire config of a repository as a map that can be indexed by setting.
No response
Add initial support for pulling latest changes from the remote.
No response
Provide initial support to the gitz
client for cloning a repository.
No response
Add some custom CSS to the docs to correctly style the notification banner. Base this on the existing styling used by mkdocs
The gitz
library should offer basic Git Log functionality.
Provide a log function that grabs a complete snapshot of the current repository history. The output should be returned as a raw string
No response
Add a method to the gitz
client that supports inspecting the current repository and collating details about its makeup. These details should include, but not be limited to:
No response
Add a utility method to the Client
that can be used to detect if the repository is currently in a dirty state. A repository is deemed to be in a dirty state if there are untracked files.
No response
Presently gitz
supports the management of local git config only. This should be extended to include support for Global and System level config. Additional operations, unset
and replace
should also be supported.
No response
Include posthog support within the existing documentation to capture analytics.
Document all new features that have been added to release 0.2.0 of gitz
All commit messages should be returned without modification when retrieving the repository log. Incorrect formatting of the log is truncating multi-line commit messages.
v0.3.1
Mac
The gitz
library should offer basic Git commit functionality.
Provide a commit function that supports the bespoke setting of a commit message.
No response
Update documentation for all changes that have been introduced through version 0.3.0 of gitz
Git supports a large array of options when retrieving the log (history) of a repository. Provide options to the Log()
function for retrieving logs from a specific directory and between a maximum of two chronological points in time.
No response
Add an additional option for limiting the number of tags that are returned by the Tags
method. This is designed to make retrieval more predictable, especially when iterating over the results.
No response
Sorting tags that contain semantic versions with prereleases is incorrect. For example, if you have the following set of tags, 0.1.0
, 0.2.0-beta.1
, 0.2.0-beta.2
and 0.2.0
, the current tag order is returned when using the git.VersionDesc
sort key:
0.2.0-beta.2
0.2.0-beta.1
0.2.0
0.1.0
package main
import (
"fmt"
"log"
git "github.com/purpleclay/gitz"
)
func main() {
gc, err := git.NewClient()
if err != nil {
log.Fatal(err.Error())
}
tags, _ := gc.Tags(git.WithSortBy(git.VersionDesc))
for _, tag := range tags {
fmt.Println(tag)
}
}
v0.3.0
Mac
When querying the log of a particular directory within the repository, it appears only paths that are relative to the repository root will return results. If an explicit path is provided, no results are returned. By using filepath.Rel
the relative path can be resolved against the root of the repository. The root of the repository can be determined using the git command git rev-parse --show-toplevel
No response
Write the documentation for the upcoming 0.4.0
release, and incude:
It seems SonarCloud only accepts a version if it exists within the sonar-project.properties
during a main branch analysis. Attempting to do this while analysing a tag, just results in a short-term branch being created. Stop tag analysis.
Extend the existing tag functionality of gitz
to support an option for generating an annotated tag. The git documentation states that an annotated tag must be created with a commit message. Provide an option to the Push()
method for an optional message.
No response
The gitz
library should offer basic Git stage functionality.
Provide a stage function that can be used to stage a single file within a repository
No response
Extend the push functionality of gitz
to be context-aware and to support additional options. By default, Push
should be aware of the active branch and push outstanding changes back to the remote.
In terms of options:
refspecs
as per the documentationNo response
gitz
is dependent on the installation of git within the current runtime. Detect if git is installed, capturing the current version. If git cannot be found, throw an error.
No response
Add a new method called Staged()
that is capable of retrieving a list of the currently staged files within the repository. These are changes that have not currently been pushed back to the remote.
No response
Use Material for MkDocs to generate some initial documentation for gitz
. Include examples of how to use the library for different scenarios
Ensure the social
plugin is correctly configured within the documentation. Use the relevant title
and description
front matter labels within each page metadata to achieve this.
Removing the path .
prevents logs from being retrieved when calling git.Log
from within a sub-directory.
The following test case would fail, as it will currently return all commits:
func TestLogRetrievedForWithinSubDirectory(t *testing.T) {
gittest.InitRepository(t, gittest.WithFiles("search/main.go"))
gittest.StageFile(t, "search/main.go")
gittest.Commit(t, "feat(search): awesome search functionality")
os.Chdir("search")
gitc, _ := git.NewClient()
log, _ := gitc.Log(git.WithPaths("."))
assert.Len(t, log.Commits, 1)
assert.Equal(t, "feat(search): awesome search functionality", log.Commits[0].Message)
}
v0.4.0
Mac
Add support for pushing staged changes to the repository remote. Pushing tags will be performed with a separate operation.
No response
The gitz
library should offer basic Git Tag functionality. Initially support lightweight tags only.
Provide a basic set of tag functions that can deliver the following set of functionality:
No response
Add a new method called DeleteTags()
that allows the deletion of tags from a repository. The default behaviour of this method should be to delete tags locally and from the remote. An option should be provided to prevent the delete from being cascaded to the remote.
No response
Dynamic configuration is supported by git
through the -c
flag. This must be specified before any subcommand. Extend the existing commands to allow config to be set at runtime. This config is not permanent and disappears after command execution, supporting a more dynamic behaviour to command execution.
git -c user.name="batman" -c user.email="[email protected]" commit --allow-empty -m "chore: just checking if dynamic config works"
None
This issue covers the expansion of the existing Clone
command and the introduction of a new dedicated Checkout
command. While cloning a repository, a branch other than the default can be checked out immediately after a clone.
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.