Skip to content

Commit 8aa50a2

Browse files
committed
doc: add module documentation for gh-workflow
1 parent 1d84284 commit 8aa50a2

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

crates/gh-workflow/src/ctx.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! A type-safe implementation of workflow context: <https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs>
2+
13
use std::fmt;
24
use std::marker::PhantomData;
35
use std::rc::Rc;
@@ -6,9 +8,6 @@ use gh_workflow_macros::Context;
68

79
use crate::Expression;
810

9-
///
10-
/// A type-safe implementation of GitHub Actions context expressions.
11-
/// Implemented based on the documentation provided here: <https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs>
1211
#[derive(Clone)]
1312
pub struct Context<A> {
1413
marker: PhantomData<A>,

crates/gh-workflow/src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! This module defines the `Error` enum and the `Result` type alias used
2+
//! throughout the crate.
3+
14
#[derive(Debug, derive_more::From)]
25
pub enum Error {
36
IO(std::io::Error),

crates/gh-workflow/src/generate.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
//! This module provides functionality to customize generation of the GitHub
2+
//! Actions workflow files.
3+
14
use std::io::ErrorKind;
25
use std::path::PathBuf;
36
use std::process::Command;

crates/gh-workflow/src/release_plz.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! A typed representation of the `release-plz` action in a GitHub workflow.
2+
//! Docs: <https://github.com/release-plz/action>
13
use derive_setters::Setters;
24

35
use crate::{Step, Use};

crates/gh-workflow/src/toolchain.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//! The typed version of https://github.com/actions-rust-lang/setup-rust-toolchain
1+
//! The typed version of the `setup-rust-toolchain` action in a GitHub workflow.
2+
//! Docs: <https://github.com/actions-rust-lang/setup-rust-toolchain>
23
34
use std::fmt::{Display, Formatter};
45

0 commit comments

Comments
 (0)