Faker C++
Loading...
Searching...
No Matches
git.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4#include <string>
5
6#include "faker-cxx/export.h"
7#include "faker-cxx/types/locale.h"
8
9namespace faker::git
10{
11struct FAKER_CXX_EXPORT Author
12{
13 std::string name;
14 std::string email;
15};
16
22
35FAKER_CXX_EXPORT std::string branch(std::optional<BranchIssueType> issueType = std::nullopt,
36 unsigned maxIssueNum = 100);
37
49FAKER_CXX_EXPORT std::string commitDate(unsigned years = 15);
50
68FAKER_CXX_EXPORT std::string commitEntry(std::optional<unsigned> dateYears = std::nullopt,
69 std::optional<unsigned> shaLength = std::nullopt,
70 Locale locale = Locale::en_US);
71
81FAKER_CXX_EXPORT std::string commitMessage();
82
94FAKER_CXX_EXPORT std::string commitSha(unsigned length = 40);
95}
Definition git.h:10
FAKER_CXX_EXPORT std::string commitMessage()
Generates a random commit message.
FAKER_CXX_EXPORT std::string commitSha(unsigned length=40)
Returns a random SHA hash.
FAKER_CXX_EXPORT std::string branch(std::optional< BranchIssueType > issueType=std::nullopt, unsigned maxIssueNum=100)
Returns a random branch name.
FAKER_CXX_EXPORT std::string commitEntry(std::optional< unsigned > dateYears=std::nullopt, std::optional< unsigned > shaLength=std::nullopt, Locale locale=Locale::en_US)
Generates a random commit entry in form of string.
FAKER_CXX_EXPORT std::string commitDate(unsigned years=15)
Generates a random date in form of string.
BranchIssueType
Definition git.h:18
Definition git.h:12
std::string name
Definition git.h:13
std::string email
Definition git.h:14