mirror of
https://github.com/alexpasmantier/television.git
synced 2025-06-01 09:00:16 +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:
|
||||
|
||||
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:
|
||||
|
||||
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",
|
||||
"cable",
|
||||
]
|
||||
rust-version = "1.81"
|
||||
rust-version = "1.83"
|
||||
|
||||
[lib]
|
||||
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
|
||||
#
|
||||
# Lines starting with "#" are comments.
|
||||
# Configuration options are organized into tables and keys.
|
||||
# See documentation for more information on available options.
|
||||
|
||||
[remote.github]
|
||||
owner = "alexpasmantier"
|
||||
repo = "television"
|
||||
|
||||
[changelog]
|
||||
# template for the changelog header
|
||||
# changelog header
|
||||
header = """
|
||||
# Changelog\n
|
||||
All notable changes to this project will be documented in this file.\n
|
||||
# Changelog
|
||||
|
||||
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
|
||||
# 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 = """
|
||||
{% if version %}\
|
||||
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||
{% else %}\
|
||||
## [unreleased]
|
||||
{% endif %}\
|
||||
{%- if not version %}
|
||||
## [unreleased]
|
||||
{% else -%}
|
||||
## [{{ version }}](https://github.com/alexpasmantier/television/releases/tag/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
|
||||
{% 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") %}
|
||||
### {{ group | striptags | trim | upper_first }}
|
||||
{% for commit in commits %}
|
||||
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
|
||||
{% if commit.breaking %}[**breaking**] {% endif %}\
|
||||
{{ commit.message | upper_first }}\
|
||||
{% endfor %}
|
||||
{% endfor %}\n
|
||||
### {{ group | striptags | trim | upper_first }}
|
||||
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
|
||||
{{ self::commit(commit=commit) }}
|
||||
{%- endfor -%}
|
||||
{% for commit in commits %}
|
||||
{%- if not commit.scope %}
|
||||
{{ 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 = """
|
||||
<!-- generated by git-cliff -->
|
||||
"""
|
||||
# remove the leading and trailing s
|
||||
trim = true
|
||||
# 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]
|
||||
# parse the commits based on https://www.conventionalcommits.org
|
||||
conventional_commits = true
|
||||
# filter out the commits that are not conventional
|
||||
filter_unconventional = false
|
||||
filter_unconventional = true
|
||||
# process each line of a commit as an individual commit
|
||||
split_commits = false
|
||||
# regex for preprocessing the commit messages
|
||||
commit_preprocessors = [
|
||||
# Replace issue numbers
|
||||
#{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"},
|
||||
# Check spelling of the commit with https://github.com/crate-ci/typos
|
||||
# If the spelling is incorrect, it will be automatically fixed.
|
||||
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
|
||||
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
|
||||
{ pattern = '(Update README.md)', replace = "docs(readme): ${1}" },
|
||||
{ pattern = '(fix typos|Fix typos)', replace = "fix: ${1}" },
|
||||
]
|
||||
# regex for parsing and grouping commits
|
||||
commit_parsers = [
|
||||
{ message = "^feat", group = "<!-- 0 -->🚀 Features" },
|
||||
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
|
||||
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
|
||||
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
|
||||
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
|
||||
{ message = "^refactor\\(clippy\\)", skip = true },
|
||||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||
@ -71,13 +110,21 @@ commit_parsers = [
|
||||
{ message = "^chore\\(deps.*\\)", skip = true },
|
||||
{ message = "^chore\\(pr\\)", skip = true },
|
||||
{ message = "^chore\\(pull\\)", skip = true },
|
||||
{ message = "^chore\\(npm\\).*yarn\\.lock", skip = true },
|
||||
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
|
||||
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||
{ 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_commits = false
|
||||
# glob pattern for matching git tags
|
||||
tag_pattern = "[0-9]*"
|
||||
# regex for ignoring tags
|
||||
ignore_tags = "alpha"
|
||||
# sort the tags topologically
|
||||
topo_order = false
|
||||
# sort the commits inside sections by oldest/newest order
|
||||
sort_commits = "oldest"
|
||||
sort_commits = "newest"
|
||||
|
@ -1,3 +1,3 @@
|
||||
[toolchain]
|
||||
channel = "1.81"
|
||||
channel = "1.83"
|
||||
components = ["rustfmt", "clippy", "rust-analyzer"]
|
||||
|
@ -14,7 +14,7 @@ categories = [
|
||||
"concurrency",
|
||||
"development-tools",
|
||||
]
|
||||
rust-version = "1.81"
|
||||
rust-version = "1.83"
|
||||
|
||||
[dependencies]
|
||||
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 {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#![allow(clippy::module_name_repetitions)]
|
||||
#![allow(clippy::module_name_repetitions, clippy::ref_option)]
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
use anyhow::Result;
|
||||
|
@ -69,11 +69,11 @@ impl Picker {
|
||||
) {
|
||||
if self.inverted {
|
||||
for _ in 0..step {
|
||||
self._select_prev(total_items, height);
|
||||
self.inner_prev(total_items, height);
|
||||
}
|
||||
} else {
|
||||
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 {
|
||||
for _ in 0..step {
|
||||
self._select_next(total_items, height);
|
||||
self.inner_next(total_items, height);
|
||||
}
|
||||
} else {
|
||||
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 relative_selected = self.relative_selected().unwrap_or(0);
|
||||
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 relative_selected = self.relative_selected().unwrap_or(0);
|
||||
self.select(Some((selected + (total_items - 1)) % total_items));
|
||||
|
@ -235,6 +235,7 @@ fn span_fast(
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::type_complexity)]
|
||||
fn style(
|
||||
style: Style,
|
||||
) -> impl Fn(&[u8]) -> IResult<&[u8], Option<Style>, nom::error::Error<&[u8]>>
|
||||
|
@ -188,7 +188,7 @@ pub fn try_preview(
|
||||
.collect::<Vec<_>>(),
|
||||
syntax_set,
|
||||
syntax_theme,
|
||||
&cached_lines,
|
||||
cached_lines.as_ref(),
|
||||
) {
|
||||
let total_lines = content.total_lines();
|
||||
let preview = Arc::new(Preview::new(
|
||||
@ -210,7 +210,7 @@ pub fn try_preview(
|
||||
.collect::<Vec<_>>(),
|
||||
syntax_set,
|
||||
syntax_theme,
|
||||
&cached_lines,
|
||||
cached_lines.as_ref(),
|
||||
) {
|
||||
let total_lines = content.total_lines();
|
||||
let preview = Arc::new(Preview::new(
|
||||
@ -250,7 +250,7 @@ fn compute_highlighted_text_preview(
|
||||
lines: &[String],
|
||||
syntax_set: &SyntaxSet,
|
||||
syntax_theme: &Theme,
|
||||
previous_lines: &Option<HighlightedLines>,
|
||||
previous_lines: Option<&HighlightedLines>,
|
||||
) -> Option<PreviewContent> {
|
||||
debug!(
|
||||
"Computing highlights in the background for {:?}",
|
||||
|
@ -138,7 +138,7 @@ pub fn compute_highlights_incremental(
|
||||
lines: &[String],
|
||||
syntax_set: &SyntaxSet,
|
||||
syntax_theme: &Theme,
|
||||
_cached_lines: &Option<HighlightedLines>,
|
||||
_cached_lines: Option<&HighlightedLines>,
|
||||
) -> Result<HighlightedLines> {
|
||||
let mut highlighted_lines: Vec<_>;
|
||||
let mut highlighter: LineHighlighter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user