Don't treat head as special in changelog
The changelog is no longer comitted, so we no longer need to avoid including the commit hash. type: documentation
This commit is contained in:
parent
2d226cf016
commit
39dcb5e183
|
@ -13,8 +13,6 @@ impl Changelog {
|
|||
|
||||
let mut entries = Vec::new();
|
||||
|
||||
let mut head = true;
|
||||
|
||||
loop {
|
||||
let summary_bytes = current
|
||||
.summary_bytes()
|
||||
|
@ -37,15 +35,12 @@ impl Changelog {
|
|||
let entry = Entry::new(
|
||||
¤t,
|
||||
manifest.package.unwrap().version.as_ref(),
|
||||
head,
|
||||
&project.config,
|
||||
)?;
|
||||
|
||||
entries.push(entry);
|
||||
}
|
||||
|
||||
head = false;
|
||||
|
||||
match current.parent_count() {
|
||||
0 => break,
|
||||
1 => current = current.parent(0)?,
|
||||
|
|
|
@ -7,12 +7,11 @@ pub(crate) struct Entry {
|
|||
hash: String,
|
||||
author: String,
|
||||
summary: String,
|
||||
head: bool,
|
||||
}
|
||||
|
||||
impl Entry {
|
||||
#[throws]
|
||||
pub(crate) fn new(commit: &Commit, version: &str, head: bool, config: &Config) -> Self {
|
||||
pub(crate) fn new(commit: &Commit, version: &str, config: &Config) -> Self {
|
||||
let time = DateTime::<Utc>::from_utc(
|
||||
NaiveDateTime::from_timestamp(commit.time().seconds(), 0),
|
||||
Utc,
|
||||
|
@ -48,18 +47,13 @@ impl Entry {
|
|||
summary: commit.summary().unwrap().into(),
|
||||
version: version.into(),
|
||||
author,
|
||||
head,
|
||||
metadata,
|
||||
time,
|
||||
}
|
||||
}
|
||||
|
||||
fn url(&self) -> String {
|
||||
if self.head {
|
||||
"https://github.com/casey/intermodal/commits/master".into()
|
||||
} else {
|
||||
format!("https://github.com/casey/intermodal/commit/{}", self.hash)
|
||||
}
|
||||
format!("https://github.com/casey/intermodal/commit/{}", self.hash)
|
||||
}
|
||||
|
||||
fn shorthash(&self) -> String {
|
||||
|
|
Loading…
Reference in New Issue
Block a user