Skip to content

Commit

Permalink
doc: add module documentation for gh-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Nov 29, 2024
1 parent 1d84284 commit 8aa50a2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
5 changes: 2 additions & 3 deletions crates/gh-workflow/src/ctx.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! 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>
use std::fmt;
use std::marker::PhantomData;
use std::rc::Rc;
Expand All @@ -6,9 +8,6 @@ use gh_workflow_macros::Context;

use crate::Expression;

///
/// A type-safe implementation of GitHub Actions context expressions.
/// 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>
#[derive(Clone)]
pub struct Context<A> {
marker: PhantomData<A>,
Expand Down
3 changes: 3 additions & 0 deletions crates/gh-workflow/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! This module defines the `Error` enum and the `Result` type alias used
//! throughout the crate.
#[derive(Debug, derive_more::From)]
pub enum Error {
IO(std::io::Error),
Expand Down
3 changes: 3 additions & 0 deletions crates/gh-workflow/src/generate.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! This module provides functionality to customize generation of the GitHub
//! Actions workflow files.
use std::io::ErrorKind;
use std::path::PathBuf;
use std::process::Command;
Expand Down
2 changes: 2 additions & 0 deletions crates/gh-workflow/src/release_plz.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! A typed representation of the `release-plz` action in a GitHub workflow.
//! Docs: <https://github.com/release-plz/action>
use derive_setters::Setters;

use crate::{Step, Use};
Expand Down
3 changes: 2 additions & 1 deletion crates/gh-workflow/src/toolchain.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! The typed version of https://github.com/actions-rust-lang/setup-rust-toolchain
//! The typed version of the `setup-rust-toolchain` action in a GitHub workflow.
//! Docs: <https://github.com/actions-rust-lang/setup-rust-toolchain>
use std::fmt::{Display, Formatter};

Expand Down

0 comments on commit 8aa50a2

Please sign in to comment.