mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-03 01:50:12 +00:00
docs(changelog): update changelog template (#317)
This commit is contained in:
parent
f9f0277184
commit
4b632f81f8
26
.github/workflows/cd.yml
vendored
26
.github/workflows/cd.yml
vendored
@ -9,6 +9,32 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
create-release:
|
||||||
|
name: Create a release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Generate a changelog
|
||||||
|
uses: orhun/git-cliff-action@v4
|
||||||
|
with:
|
||||||
|
config: cliff.toml
|
||||||
|
args: --latest --strip header
|
||||||
|
env:
|
||||||
|
OUTPUT: BODY.md
|
||||||
|
|
||||||
|
- name: Publish on GitHub
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
prerelease: false
|
||||||
|
bodyFile: BODY.md
|
||||||
|
|
||||||
|
|
||||||
publish-release:
|
publish-release:
|
||||||
|
|
||||||
name: Publishing for ${{ matrix.os }}
|
name: Publishing for ${{ matrix.os }}
|
||||||
|
983
CHANGELOG.md
983
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,7 @@ include = [
|
|||||||
".config/config.toml",
|
".config/config.toml",
|
||||||
"cable",
|
"cable",
|
||||||
]
|
]
|
||||||
rust-version = "1.81"
|
rust-version = "1.83"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
path = "television/lib.rs"
|
path = "television/lib.rs"
|
||||||
|
121
cliff.toml
121
cliff.toml
@ -1,69 +1,108 @@
|
|||||||
# git-cliff ~ default configuration file
|
# git-cliff ~ configuration file
|
||||||
# https://git-cliff.org/docs/configuration
|
# https://git-cliff.org/docs/configuration
|
||||||
#
|
|
||||||
# Lines starting with "#" are comments.
|
[remote.github]
|
||||||
# Configuration options are organized into tables and keys.
|
owner = "alexpasmantier"
|
||||||
# See documentation for more information on available options.
|
repo = "television"
|
||||||
|
|
||||||
[changelog]
|
[changelog]
|
||||||
# template for the changelog header
|
# changelog header
|
||||||
header = """
|
header = """
|
||||||
# Changelog\n
|
# Changelog
|
||||||
All notable changes to this project will be documented in this file.\n
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
<!-- ignore lint rules that are often triggered by content generated from commits / git-cliff -->
|
||||||
|
<!-- markdownlint-disable line-length no-bare-urls ul-style emphasis-style -->
|
||||||
"""
|
"""
|
||||||
# template for the changelog body
|
# template for the changelog body
|
||||||
# https://keats.github.io/tera/docs/#introduction
|
# https://keats.github.io/tera/docs/#introduction
|
||||||
|
# note that the - before / after the % controls whether whitespace is rendered between each line.
|
||||||
|
# Getting this right so that the markdown renders with the correct number of lines between headings
|
||||||
|
# code fences and list items is pretty finicky. Note also that the 4 backticks in the commit macro
|
||||||
|
# is intentional as this escapes any backticks in the commit body.
|
||||||
body = """
|
body = """
|
||||||
{% if version %}\
|
{%- if not version %}
|
||||||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
## [unreleased]
|
||||||
{% else %}\
|
{% else -%}
|
||||||
## [unreleased]
|
## [{{ version }}](https://github.com/alexpasmantier/television/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||||
{% endif %}\
|
{% endif -%}
|
||||||
|
|
||||||
|
{% macro commit(commit) -%}
|
||||||
|
- [{{ commit.id | truncate(length=7, end="") }}]({{ "https://github.com/alexpamantier/television/commit/" ~ commit.id }}) \
|
||||||
|
*({{commit.scope | default(value = "uncategorized") | lower }})* {{ commit.message | upper_first | trim }}\
|
||||||
|
{% if commit.remote.username %} by @{{ commit.remote.username }}{%- endif -%}\
|
||||||
|
{% if commit.remote.pr_number %} in [#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}){%- endif %}\
|
||||||
|
{%- if commit.breaking %} [**breaking**]{% endif %}
|
||||||
|
{% endmacro -%}
|
||||||
|
|
||||||
{% for group, commits in commits | group_by(attribute="group") %}
|
{% for group, commits in commits | group_by(attribute="group") %}
|
||||||
### {{ group | striptags | trim | upper_first }}
|
### {{ group | striptags | trim | upper_first }}
|
||||||
{% for commit in commits %}
|
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
|
||||||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
{{ self::commit(commit=commit) }}
|
||||||
{% if commit.breaking %}[**breaking**] {% endif %}\
|
{%- endfor -%}
|
||||||
{{ commit.message | upper_first }}\
|
{% for commit in commits %}
|
||||||
{% endfor %}
|
{%- if not commit.scope %}
|
||||||
{% endfor %}\n
|
{{ self::commit(commit=commit) }}
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endfor -%}
|
||||||
|
{%- endfor %}
|
||||||
|
|
||||||
|
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
|
||||||
|
### New Contributors
|
||||||
|
{%- endif %}\
|
||||||
|
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
|
||||||
|
* @{{ contributor.username }} made their first contribution
|
||||||
|
{%- if contributor.pr_number %} in \
|
||||||
|
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor -%}
|
||||||
|
|
||||||
|
{% if version %}
|
||||||
|
{% if previous.version %}
|
||||||
|
**Full Changelog**: {{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }}
|
||||||
|
{% endif %}
|
||||||
|
{% else -%}
|
||||||
|
{% raw %}\n{% endraw %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{%- macro remote_url() -%}
|
||||||
|
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
|
||||||
|
{% endmacro %}
|
||||||
"""
|
"""
|
||||||
# template for the changelog footer
|
|
||||||
|
|
||||||
|
# remove the leading and trailing whitespace from the template
|
||||||
|
trim = false
|
||||||
|
# changelog footer
|
||||||
footer = """
|
footer = """
|
||||||
<!-- generated by git-cliff -->
|
<!-- generated by git-cliff -->
|
||||||
"""
|
"""
|
||||||
# remove the leading and trailing s
|
|
||||||
trim = true
|
|
||||||
# postprocessors
|
|
||||||
postprocessors = [
|
postprocessors = [
|
||||||
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
|
{ pattern = '<!-- Please read CONTRIBUTING.md before submitting any pull request. -->', replace = "" },
|
||||||
|
{ pattern = '>---+\n', replace = '' },
|
||||||
|
{ pattern = ' +\n', replace = "\n" },
|
||||||
]
|
]
|
||||||
# render body even when there are no releases to process
|
|
||||||
# render_always = true
|
|
||||||
# output file path
|
|
||||||
# output = "test.md"
|
|
||||||
|
|
||||||
[git]
|
[git]
|
||||||
# parse the commits based on https://www.conventionalcommits.org
|
# parse the commits based on https://www.conventionalcommits.org
|
||||||
conventional_commits = true
|
conventional_commits = true
|
||||||
# filter out the commits that are not conventional
|
# filter out the commits that are not conventional
|
||||||
filter_unconventional = false
|
filter_unconventional = true
|
||||||
# process each line of a commit as an individual commit
|
# process each line of a commit as an individual commit
|
||||||
split_commits = false
|
split_commits = false
|
||||||
# regex for preprocessing the commit messages
|
# regex for preprocessing the commit messages
|
||||||
commit_preprocessors = [
|
commit_preprocessors = [
|
||||||
# Replace issue numbers
|
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
|
||||||
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
{ pattern = '(Update README.md)', replace = "docs(readme): ${1}" },
|
||||||
# Check spelling of the commit with https://github.com/crate-ci/typos
|
{ pattern = '(fix typos|Fix typos)', replace = "fix: ${1}" },
|
||||||
# If the spelling is incorrect, it will be automatically fixed.
|
|
||||||
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
|
||||||
]
|
]
|
||||||
# regex for parsing and grouping commits
|
# regex for parsing and grouping commits
|
||||||
commit_parsers = [
|
commit_parsers = [
|
||||||
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
|
||||||
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
||||||
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
||||||
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
||||||
|
{ message = "^refactor\\(clippy\\)", skip = true },
|
||||||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||||
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||||
@ -71,13 +110,21 @@ commit_parsers = [
|
|||||||
{ message = "^chore\\(deps.*\\)", skip = true },
|
{ message = "^chore\\(deps.*\\)", skip = true },
|
||||||
{ message = "^chore\\(pr\\)", skip = true },
|
{ message = "^chore\\(pr\\)", skip = true },
|
||||||
{ message = "^chore\\(pull\\)", skip = true },
|
{ message = "^chore\\(pull\\)", skip = true },
|
||||||
|
{ message = "^chore\\(npm\\).*yarn\\.lock", skip = true },
|
||||||
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||||
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||||
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# protect breaking changes from being skipped due to matching a skipping commit_parser
|
||||||
|
protect_breaking_commits = false
|
||||||
# filter out the commits that are not matched by commit parsers
|
# filter out the commits that are not matched by commit parsers
|
||||||
filter_commits = false
|
filter_commits = false
|
||||||
|
# glob pattern for matching git tags
|
||||||
|
tag_pattern = "[0-9]*"
|
||||||
|
# regex for ignoring tags
|
||||||
|
ignore_tags = "alpha"
|
||||||
# sort the tags topologically
|
# sort the tags topologically
|
||||||
topo_order = false
|
topo_order = false
|
||||||
# sort the commits inside sections by oldest/newest order
|
# sort the commits inside sections by oldest/newest order
|
||||||
sort_commits = "oldest"
|
sort_commits = "newest"
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.81"
|
channel = "1.83"
|
||||||
components = ["rustfmt", "clippy", "rust-analyzer"]
|
components = ["rustfmt", "clippy", "rust-analyzer"]
|
||||||
|
@ -14,7 +14,7 @@ categories = [
|
|||||||
"concurrency",
|
"concurrency",
|
||||||
"development-tools",
|
"development-tools",
|
||||||
]
|
]
|
||||||
rust-version = "1.81"
|
rust-version = "1.83"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
proc-macro2 = "1.0.93"
|
proc-macro2 = "1.0.93"
|
||||||
|
@ -144,6 +144,7 @@ async fn load_candidates(command: String, injector: Injector<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let _ = child.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
impl OnAir for Channel {
|
impl OnAir for Channel {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#![allow(clippy::module_name_repetitions)]
|
#![allow(clippy::module_name_repetitions, clippy::ref_option)]
|
||||||
use std::{env, path::PathBuf};
|
use std::{env, path::PathBuf};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
|
@ -69,11 +69,11 @@ impl Picker {
|
|||||||
) {
|
) {
|
||||||
if self.inverted {
|
if self.inverted {
|
||||||
for _ in 0..step {
|
for _ in 0..step {
|
||||||
self._select_prev(total_items, height);
|
self.inner_prev(total_items, height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for _ in 0..step {
|
for _ in 0..step {
|
||||||
self._select_next(total_items, height);
|
self.inner_next(total_items, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,16 +86,16 @@ impl Picker {
|
|||||||
) {
|
) {
|
||||||
if self.inverted {
|
if self.inverted {
|
||||||
for _ in 0..step {
|
for _ in 0..step {
|
||||||
self._select_next(total_items, height);
|
self.inner_next(total_items, height);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for _ in 0..step {
|
for _ in 0..step {
|
||||||
self._select_prev(total_items, height);
|
self.inner_prev(total_items, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _select_next(&mut self, total_items: usize, height: usize) {
|
fn inner_next(&mut self, total_items: usize, height: usize) {
|
||||||
let selected = self.selected().unwrap_or(0);
|
let selected = self.selected().unwrap_or(0);
|
||||||
let relative_selected = self.relative_selected().unwrap_or(0);
|
let relative_selected = self.relative_selected().unwrap_or(0);
|
||||||
self.select(Some(selected.saturating_add(1) % total_items));
|
self.select(Some(selected.saturating_add(1) % total_items));
|
||||||
@ -105,7 +105,7 @@ impl Picker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn _select_prev(&mut self, total_items: usize, height: usize) {
|
fn inner_prev(&mut self, total_items: usize, height: usize) {
|
||||||
let selected = self.selected().unwrap_or(0);
|
let selected = self.selected().unwrap_or(0);
|
||||||
let relative_selected = self.relative_selected().unwrap_or(0);
|
let relative_selected = self.relative_selected().unwrap_or(0);
|
||||||
self.select(Some((selected + (total_items - 1)) % total_items));
|
self.select(Some((selected + (total_items - 1)) % total_items));
|
||||||
|
@ -235,6 +235,7 @@ fn span_fast(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
fn style(
|
fn style(
|
||||||
style: Style,
|
style: Style,
|
||||||
) -> impl Fn(&[u8]) -> IResult<&[u8], Option<Style>, nom::error::Error<&[u8]>>
|
) -> impl Fn(&[u8]) -> IResult<&[u8], Option<Style>, nom::error::Error<&[u8]>>
|
||||||
|
@ -188,7 +188,7 @@ pub fn try_preview(
|
|||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
syntax_set,
|
syntax_set,
|
||||||
syntax_theme,
|
syntax_theme,
|
||||||
&cached_lines,
|
cached_lines.as_ref(),
|
||||||
) {
|
) {
|
||||||
let total_lines = content.total_lines();
|
let total_lines = content.total_lines();
|
||||||
let preview = Arc::new(Preview::new(
|
let preview = Arc::new(Preview::new(
|
||||||
@ -210,7 +210,7 @@ pub fn try_preview(
|
|||||||
.collect::<Vec<_>>(),
|
.collect::<Vec<_>>(),
|
||||||
syntax_set,
|
syntax_set,
|
||||||
syntax_theme,
|
syntax_theme,
|
||||||
&cached_lines,
|
cached_lines.as_ref(),
|
||||||
) {
|
) {
|
||||||
let total_lines = content.total_lines();
|
let total_lines = content.total_lines();
|
||||||
let preview = Arc::new(Preview::new(
|
let preview = Arc::new(Preview::new(
|
||||||
@ -250,7 +250,7 @@ fn compute_highlighted_text_preview(
|
|||||||
lines: &[String],
|
lines: &[String],
|
||||||
syntax_set: &SyntaxSet,
|
syntax_set: &SyntaxSet,
|
||||||
syntax_theme: &Theme,
|
syntax_theme: &Theme,
|
||||||
previous_lines: &Option<HighlightedLines>,
|
previous_lines: Option<&HighlightedLines>,
|
||||||
) -> Option<PreviewContent> {
|
) -> Option<PreviewContent> {
|
||||||
debug!(
|
debug!(
|
||||||
"Computing highlights in the background for {:?}",
|
"Computing highlights in the background for {:?}",
|
||||||
|
@ -138,7 +138,7 @@ pub fn compute_highlights_incremental(
|
|||||||
lines: &[String],
|
lines: &[String],
|
||||||
syntax_set: &SyntaxSet,
|
syntax_set: &SyntaxSet,
|
||||||
syntax_theme: &Theme,
|
syntax_theme: &Theme,
|
||||||
_cached_lines: &Option<HighlightedLines>,
|
_cached_lines: Option<&HighlightedLines>,
|
||||||
) -> Result<HighlightedLines> {
|
) -> Result<HighlightedLines> {
|
||||||
let mut highlighted_lines: Vec<_>;
|
let mut highlighted_lines: Vec<_>;
|
||||||
let mut highlighter: LineHighlighter;
|
let mut highlighter: LineHighlighter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user