Compare commits
6 changed files with 0 additions and 43 deletions
|
|
@ -26,12 +26,6 @@ pub struct CommentArgs {
|
||||||
file: PathBuf,
|
file: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Returns an error if the input file doesn't exist or can't be
|
|
||||||
/// read. Propagates any transport error from the Forgejo REST call
|
|
||||||
/// (network unreachable, 4xx/5xx response, token missing/invalid)
|
|
||||||
/// and any I/O error from writing the browser download URL to stdout.
|
|
||||||
pub fn run_issue(client: &Client, args: IssueArgs) -> Result<()> {
|
pub fn run_issue(client: &Client, args: IssueArgs) -> Result<()> {
|
||||||
if !args.file.is_file() {
|
if !args.file.is_file() {
|
||||||
bail!(
|
bail!(
|
||||||
|
|
@ -48,12 +42,6 @@ pub fn run_issue(client: &Client, args: IssueArgs) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Returns an error if the input file doesn't exist or can't be
|
|
||||||
/// read. Propagates any transport error from the Forgejo REST call
|
|
||||||
/// (network unreachable, 4xx/5xx response, token missing/invalid)
|
|
||||||
/// and any I/O error from writing the browser download URL to stdout.
|
|
||||||
pub fn run_comment(client: &Client, args: CommentArgs) -> Result<()> {
|
pub fn run_comment(client: &Client, args: CommentArgs) -> Result<()> {
|
||||||
if !args.file.is_file() {
|
if !args.file.is_file() {
|
||||||
bail!(
|
bail!(
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,6 @@ pub struct Args {
|
||||||
body_file: Option<String>,
|
body_file: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Propagates any I/O error from the body input (`--body-file`,
|
|
||||||
/// stdin), any transport error from the Forgejo REST call (network
|
|
||||||
/// unreachable, 4xx/5xx response, token missing/invalid), and any
|
|
||||||
/// I/O error from writing the response to stdout.
|
|
||||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||||
let body = body::resolve_required(args.body.as_deref(), args.body_file.as_deref(), "comment")?;
|
let body = body::resolve_required(args.body.as_deref(), args.body_file.as_deref(), "comment")?;
|
||||||
let repo = client.repo();
|
let repo = client.repo();
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,6 @@ pub struct Args {
|
||||||
body_file: Option<String>,
|
body_file: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Propagates any I/O error from the body input (`--body-file`,
|
|
||||||
/// stdin), any transport error from the Forgejo REST call (network
|
|
||||||
/// unreachable, 4xx/5xx response, token missing/invalid), and any
|
|
||||||
/// I/O error from writing the response to stdout.
|
|
||||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||||
let body = body::resolve_required(
|
let body = body::resolve_required(
|
||||||
args.body.as_deref(),
|
args.body.as_deref(),
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,6 @@ pub struct Args {
|
||||||
assignee: Option<String>,
|
assignee: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Propagates any I/O error from the body input (`--body-file`,
|
|
||||||
/// stdin), any transport error from the Forgejo REST call (network
|
|
||||||
/// unreachable, 4xx/5xx response, token missing/invalid), and any
|
|
||||||
/// I/O error from writing the issue URL to stdout.
|
|
||||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||||
let body = body::resolve(args.body.as_deref(), args.body_file.as_deref())?.unwrap_or_default();
|
let body = body::resolve(args.body.as_deref(), args.body_file.as_deref())?.unwrap_or_default();
|
||||||
let repo = client.repo();
|
let repo = client.repo();
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,6 @@ pub struct Args {
|
||||||
milestone: Option<u64>,
|
milestone: Option<u64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Propagates any I/O error from the body input (`--body-file`,
|
|
||||||
/// stdin), any transport error from the Forgejo REST call (network
|
|
||||||
/// unreachable, 4xx/5xx response, token missing/invalid), and any
|
|
||||||
/// I/O error from writing the response to stdout.
|
|
||||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||||
// Body is partial: only update the body field if a source was
|
// Body is partial: only update the body field if a source was
|
||||||
// actually given. Piped stdin without --body/--body-file leaves
|
// actually given. Piped stdin without --body/--body-file leaves
|
||||||
|
|
|
||||||
|
|
@ -51,13 +51,6 @@ pub struct Args {
|
||||||
remote: String,
|
remote: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// # Errors
|
|
||||||
///
|
|
||||||
/// Propagates any I/O error from the body input (`--body-file`,
|
|
||||||
/// stdin) or the `--push` shellout to git, any transport error from
|
|
||||||
/// the Forgejo REST call (network unreachable, 4xx/5xx response,
|
|
||||||
/// token missing/invalid), and any I/O error from writing the PR
|
|
||||||
/// URL to stdout.
|
|
||||||
pub fn run(client: &Client, args: Args) -> Result<()> {
|
pub fn run(client: &Client, args: Args) -> Result<()> {
|
||||||
let body = body::resolve(args.body.as_deref(), args.body_file.as_deref())?.unwrap_or_default();
|
let body = body::resolve(args.body.as_deref(), args.body_file.as_deref())?.unwrap_or_default();
|
||||||
if args.push {
|
if args.push {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue