% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/org_grade_assignment.R
\name{org_grade_assignment}
\alias{org_grade_assignment}
\title{Setup grading for an assignment}
\usage{
org_grade_assignment(
  path,
  org,
  repo_filter,
  artifacts = character(),
  comment_template = "",
  key_repo = NULL
)
}
\arguments{
\item{path}{Character. Root directory for the grading folder (created if it doesn't exist).}

\item{org}{Character. Name of the GitHub organization.}

\item{repo_filter}{Character. Regex pattern passed to \code{\link[=org_repos]{org_repos()}}'s \code{filter}
argument to select repos (e.g. \code{"hw01_"}).}

\item{artifacts}{Named character vector. Names are subfolder names, values are
regex patterns passed as \code{filter} to \code{\link[=action_artifact_download]{action_artifact_download()}} (matched
against artifact names). E.g. \code{c("html" = "html-output", "report" = "pdf-report")}.}

\item{comment_template}{Character. Template text used to populate each comment
markdown file. Defaults to \code{""}.}

\item{key_repo}{Character. Optional repository address in \code{owner/name} format
to clone into the root of the grading folder as an answer key.}
}
\value{
An invisible list containing:
\itemize{
\item \code{repos} — character vector of matched repo addresses
\item \code{cloned} — result from \code{\link[=local_repo_clone]{local_repo_clone()}}
\item \code{artifacts} — named list of results from each \code{\link[=action_artifact_download]{action_artifact_download()}} call
\item \code{comments} — character vector of comment file paths created
\item \code{key} — result from cloning the key repo (if provided)
}
}
\description{
This is a higher level function that automates the common steps for
setting up grading of an assignment:
\itemize{
\item Find repos matching a filter pattern in an organization
\item Clone all matched repos locally
\item Download GitHub Actions artifacts (e.g. rendered html, md files)
\item Report any missing artifacts
\item Create comment template files for each repo
}
}
