Expand description
§Git-bot-feedback
A rust library designed for CI tools to easily submit feedback on a git server.
Feedback on a git server using this library can be in the form of
- thread comments (for a PR or commit)
- setting output variables for other CI tools to consume
- append a summary comment to a CI workflow run’s summary page
- mark the start and end of a group of log statements (in the CI workflow run’s logs)
More features are planned, like PR reviews and file annotations.
§Optional Features
These cargo features are optional and disabled by default:
file-changes: ability to list files changed with information like which lines have additions or which lines are shown in the diff.
§Supported git servers
Initially this project os designed to work with GitHub. But the API is designed to easily add support for other git servers. The following is just a list of git servers that are planned (in order or priority).
- GitHub
- GitLab
- Gitea
- BitBucket
§GPL license
This project is licensed under GPL-3.0-or-later.
Since this library ultimately requires write access to users’ projects (to allow posting comments), it could easily be modified with malicious intent.
By using the GPL-3.0-or-later license, we can offer some assurance and help safeguard end-users’ data/privacy because the following conditions must be met:
- the source code is publicly available
- any redistributed forms must state their modifications (if any)
- any redistributed forms must use the same GPL-3.0-or-later license
Re-exports§
pub use client::RestApiClient;pub use client::RestApiRateLimitHeaders;pub use error::RestClientError;pub use fast_glob;file-changespub use regex;file-changes
Modules§
- client
- A module to contain traits and structs that are needed by the rest of the git-bot-feedback crate’s API.
- error
- Error types used across the git-bot-feedback crate.
Structs§
- Diff
Hunk Header file-changes - A struct to represent the header information of a diff hunk.
- File
Diff Lines file-changes - A structure to represent a file’s changes per line numbers.
- File
Filter file-changes - A structure to encapsulate file path filtering behavior.
- Output
Variable - A type to represent an output variable.
- Thread
Comment Options - Options that control posting comments on a thread.
Enums§
- Comment
Kind - An enumeration of possible type of comments being posted.
- Comment
Policy - An enumeration of supported behaviors about posting comments.
- Lines
Changed Only file-changes - An enum to help determine what constitutes a changed file based on the diff contents.
Functions§
- parse_
diff file-changes - Parses a git
diffstring into a map of file names to their correspondingFileDiffLines.