Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
shift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eduardo Trujillo
shift
Commits
1eee3efe
Unverified
Commit
1eee3efe
authored
8 years ago
by
Eduardo Trujillo
Browse files
Options
Downloads
Patches
Plain Diff
feat(Git): Add support for plain changelogs (No external hosting)
parent
b7d6ae78
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Shift/CLI.hs
+2
-1
2 additions, 1 deletion
src/Shift/CLI.hs
src/Shift/Git.hs
+3
-0
3 additions, 0 deletions
src/Shift/Git.hs
src/Shift/Types.hs
+11
-2
11 additions, 2 deletions
src/Shift/Types.hs
with
16 additions
and
3 deletions
src/Shift/CLI.hs
+
2
−
1
View file @
1eee3efe
...
...
@@ -18,7 +18,7 @@ data ShiftOptions = ShiftOptions
data
ShiftCommand
=
GenerateCommand
deriving
(
Show
,
Eq
,
Enum
)
data
HostingType
=
GitHubType
deriving
(
Show
,
Eq
,
Enum
)
data
HostingType
=
GitHubType
|
GitType
deriving
(
Show
,
Eq
,
Enum
)
shiftOptions
::
Parser
ShiftOptions
shiftOptions
=
ShiftOptions
...
...
@@ -55,6 +55,7 @@ shiftCommand = subparser $
hostingType
::
ReadM
HostingType
hostingType
=
eitherReader
$
\
case
"github"
->
Right
GitHubType
"git"
->
Right
GitType
x
->
Left
$
"`"
++
x
++
"` is not a supported hosting type"
makeLenses
''ShiftOptions
This diff is collapsed.
Click to expand it.
src/Shift/Git.hs
+
3
−
0
View file @
1eee3efe
...
...
@@ -57,6 +57,9 @@ tempMain opts = withRepo ".git" $ \repo -> do
runReaderT
(
void
$
runStateT
(
mapM_
(
renderDiff
repo
)
pairedTags
)
state
)
opts
GitType
->
runReaderT
(
void
$
runStateT
(
mapM_
(
renderDiff
repo
)
pairedTags
)
GitClientState
)
opts
where
initGitHubState
=
do
...
...
This diff is collapsed.
Click to expand it.
src/Shift/Types.hs
+
11
−
2
View file @
1eee3efe
...
...
@@ -18,11 +18,12 @@ import Control.Monad.State (MonadState, StateT, gets)
import
Control.Monad.Trans
(
liftIO
)
import
Data.Default
(
Default
,
def
)
import
Data.Git
(
Commit
,
Person
,
Ref
,
RefName
,
personEmail
)
personEmail
,
personName
)
import
Data.HashMap.Strict
(
HashMap
,
insert
,
lookup
)
import
Data.HashSet
(
HashSet
)
import
Data.String.Conversions
(
cs
)
import
Data.Text
(
Text
)
import
qualified
Data.Text
as
T
import
qualified
Data.Vector
as
V
import
Data.Versions
(
Versioning
)
import
GitHub
(
executeRequestWithMgr
)
...
...
@@ -77,7 +78,6 @@ data BreakingChange = BreakingChange
,
_bcBody
::
Text
}
deriving
(
Show
)
data
ConventionalCommit
=
ConventionalCommit
{
_ccType
::
CommitType
,
_ccScope
::
Text
...
...
@@ -145,6 +145,15 @@ instance Default RepositoryCache where
makeClassy
''RepositoryCache
data
GitClientState
=
GitClientState
instance
ClientState
GitClientState
where
getRefURL
_
=
pure
Nothing
getAuthorInfo
person
=
pure
.
Just
$
(
cs
$
personName
person
,
mconcat
[
"mailto://"
,
cs
$
personEmail
person
]
)
data
GitHubClientState
=
GitHubClientState
{
_gcsCache
::
RepositoryCache
,
_gcsAuth
::
Auth
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment