diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce4bb2..d8dca3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.1.0 (Next) +### 1.1.0 - Enable issue updating during out/put step. ### 1.0.1 diff --git a/Cargo.toml b/Cargo.toml index 216086e..7966ca2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "concourse-github-issue" -version = "1.0.1" +version = "1.1.0" edition = "2021" [dependencies] diff --git a/README.md b/README.md index 4969e1c..10804e9 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,6 @@ This repository and project is based on the work performed for [MITODL](https:// ## Behavior -**All references to update operations are for the upcoming v1.1.0 release.** - ### `source`: designates the Github repository, issue number, and personal access token **parameters** diff --git a/doc/all.html b/doc/all.html index fc68b35..8fa0f45 100644 --- a/doc/all.html +++ b/doc/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Functions

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Functions

\ No newline at end of file diff --git a/doc/concourse/index.html b/doc/concourse/index.html index 7b21deb..6375326 100644 --- a/doc/concourse/index.html +++ b/doc/concourse/index.html @@ -1,3 +1,3 @@ -concourse_github_issue::concourse - Rust
Expand description

Concourse

+concourse_github_issue::concourse - Rust
Expand description

Concourse

concourse contains the structs for serialization to concourse outputs and deserialization from concourse inputs. Ordinarily more functionality is required here, but this crate leverages the concourse rust bindings to automatically provide functionality through trait implementations.

Structs

\ No newline at end of file diff --git a/doc/concourse/struct.OutMetadata.html b/doc/concourse/struct.OutMetadata.html index 8cc09b3..207c6c4 100644 --- a/doc/concourse/struct.OutMetadata.html +++ b/doc/concourse/struct.OutMetadata.html @@ -1,4 +1,4 @@ -OutMetadata in concourse_github_issue::concourse - Rust
pub(crate) struct OutMetadata {
+OutMetadata in concourse_github_issue::concourse - Rust
pub(crate) struct OutMetadata {
     number: u64,
     url: String,
     title: String,
@@ -8,7 +8,7 @@
     milestone: Option<Milestone>,
     created: String,
     updated: String,
-}

Fields§

§number: u64§url: String§title: String§state: IssueState§labels: Vec<Label>§assignees: Vec<Author>§milestone: Option<Milestone>§created: String§updated: String

Implementations§

source§

impl OutMetadata

source

pub(crate) fn new( +}

Fields§

§number: u64§url: String§title: String§state: IssueState§labels: Vec<Label>§assignees: Vec<Author>§milestone: Option<Milestone>§created: String§updated: String

Implementations§

source§

impl OutMetadata

source

pub(crate) fn new( number: u64, url: impl Into<String>, title: String, @@ -20,7 +20,17 @@ updated: String ) -> Self

Constructor

Examples
-
let metadata = OutMetadata::new(10, !vec[String::from("triage")], !vec[String::from("myuser")], 3); // this is inaccurate re: struct models
+
let metadata = OutMetadata::new(
+    5,
+    String::from("http://does.not.exist"),
+    String::from("some issue"),
+    octocrab::models::IssueState::Open,
+    vec![],
+    vec![],
+    None,
+    String::from("yesterday"),
+    String::from("today"),
+),

Trait Implementations§

source§

impl Debug for OutMetadata

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl IntoMetadataKV for OutMetadata

source§

fn into_metadata_kv(self) -> Vec<KV>

Turn self into a Vec of internal::KV
source§

impl PartialEq for OutMetadata

source§

fn eq(&self, other: &OutMetadata) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for OutMetadata

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where diff --git a/doc/concourse/struct.OutParams.html b/doc/concourse/struct.OutParams.html index 7f74719..23efe74 100644 --- a/doc/concourse/struct.OutParams.html +++ b/doc/concourse/struct.OutParams.html @@ -1,4 +1,4 @@ -OutParams in concourse_github_issue::concourse - Rust
pub(crate) struct OutParams {
+OutParams in concourse_github_issue::concourse - Rust
pub(crate) struct OutParams {
     title: String,
     body: Option<String>,
     labels: Option<Vec<String>>,
diff --git a/doc/concourse/struct.Source.html b/doc/concourse/struct.Source.html
index b32f8c8..e70853e 100644
--- a/doc/concourse/struct.Source.html
+++ b/doc/concourse/struct.Source.html
@@ -1,4 +1,4 @@
-Source in concourse_github_issue::concourse - Rust
pub(crate) struct Source {
+Source in concourse_github_issue::concourse - Rust
pub(crate) struct Source {
     pat: Option<String>,
     owner: String,
     repo: String,
diff --git a/doc/concourse/struct.Version.html b/doc/concourse/struct.Version.html
index 67b1ffd..d473ae1 100644
--- a/doc/concourse/struct.Version.html
+++ b/doc/concourse/struct.Version.html
@@ -1,4 +1,4 @@
-Version in concourse_github_issue::concourse - Rust
pub(crate) struct Version {
+Version in concourse_github_issue::concourse - Rust
pub(crate) struct Version {
     state: String,
 }

Fields§

§state: String

Implementations§

source§

impl Version

source

pub(crate) fn new(state: String) -> Self

Constructor

Examples
diff --git a/doc/fn.main.html b/doc/fn.main.html index 47e26a1..beafca2 100644 --- a/doc/fn.main.html +++ b/doc/fn.main.html @@ -1 +1 @@ -main in concourse_github_issue - Rust
pub(crate) fn main()
\ No newline at end of file +main in concourse_github_issue - Rust
pub(crate) fn main()
\ No newline at end of file diff --git a/doc/github_issue/enum.Action.html b/doc/github_issue/enum.Action.html index 5d292ab..e352512 100644 --- a/doc/github_issue/enum.Action.html +++ b/doc/github_issue/enum.Action.html @@ -1,9 +1,9 @@ -Action in concourse_github_issue::github_issue - Rust
#[non_exhaustive]
pub(crate) enum Action { +Action in concourse_github_issue::github_issue - Rust
#[non_exhaustive]
pub(crate) enum Action { Create, List, Read, Update, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Create

§

List

§

Read

§

Update

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Create

§

List

§

Read

§

Update

Trait Implementations§

source§

impl Clone for Action

source§

fn clone(&self) -> Action

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl ToString for Action

source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl Copy for Action

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

@@ -20,7 +20,8 @@ Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns -Action::Follow. Read more
source§

impl<T, U> TryFrom<U> for Twhere +Action::Follow. Read more

source§

impl<T> ToOwned for Twhere + T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a diff --git a/doc/github_issue/fn.str_to_issue_state.html b/doc/github_issue/fn.str_to_issue_state.html index 1a57806..383a488 100644 --- a/doc/github_issue/fn.str_to_issue_state.html +++ b/doc/github_issue/fn.str_to_issue_state.html @@ -1 +1 @@ -str_to_issue_state in concourse_github_issue::github_issue - Rust
fn str_to_issue_state(param: &str) -> Result<IssueState, &str>
\ No newline at end of file +str_to_issue_state in concourse_github_issue::github_issue - Rust
fn str_to_issue_state(param: &str) -> Result<IssueState, &str>
\ No newline at end of file diff --git a/doc/github_issue/fn.str_to_params_state.html b/doc/github_issue/fn.str_to_params_state.html index d508dac..41d5df4 100644 --- a/doc/github_issue/fn.str_to_params_state.html +++ b/doc/github_issue/fn.str_to_params_state.html @@ -1 +1 @@ -str_to_params_state in concourse_github_issue::github_issue - Rust
fn str_to_params_state(param: &str) -> Result<State, &str>
\ No newline at end of file +str_to_params_state in concourse_github_issue::github_issue - Rust
fn str_to_params_state(param: &str) -> Result<State, &str>
\ No newline at end of file diff --git a/doc/github_issue/index.html b/doc/github_issue/index.html index d0b6fa7..528b5c1 100644 --- a/doc/github_issue/index.html +++ b/doc/github_issue/index.html @@ -1,3 +1,3 @@ -concourse_github_issue::github_issue - Rust
Expand description

Github Issue

+concourse_github_issue::github_issue - Rust
Expand description

Github Issue

github_issue is a minimal utility to create and update issues within Github.

Structs

Enums

Functions

\ No newline at end of file diff --git a/doc/github_issue/struct.Issue.html b/doc/github_issue/struct.Issue.html index be4ea70..01a86dd 100644 --- a/doc/github_issue/struct.Issue.html +++ b/doc/github_issue/struct.Issue.html @@ -1,4 +1,4 @@ -Issue in concourse_github_issue::github_issue - Rust
pub(crate) struct Issue<'issue> {
+Issue in concourse_github_issue::github_issue - Rust
pub(crate) struct Issue<'issue> {
     pat: Option<String>,
     owner: &'issue str,
     repo: &'issue str,
@@ -9,7 +9,7 @@
     number: Option<u64>,
     state: Option<&'issue str>,
     milestone: Option<u64>,
-}

Fields§

§pat: Option<String>§owner: &'issue str§repo: &'issue str§title: Option<String>§body: Option<String>§labels: Option<Vec<String>>§assignees: Option<Vec<String>>§number: Option<u64>§state: Option<&'issue str>§milestone: Option<u64>

Implementations§

source§

impl<'issue> Issue<'issue>

source

pub(crate) fn new( +}

Fields§

§pat: Option<String>§owner: &'issue str§repo: &'issue str§title: Option<String>§body: Option<String>§labels: Option<Vec<String>>§assignees: Option<Vec<String>>§number: Option<u64>§state: Option<&'issue str>§milestone: Option<u64>

Implementations§

source§

impl<'issue> Issue<'issue>

source

pub(crate) fn new( pat: Option<String>, owner: &'issue str, repo: &'issue str, @@ -23,18 +23,18 @@ ) -> Self

Constructor for the Config struct. Contains all of the members necessary for instantiating a client and performing an action.

Examples
let gh_issue = Issue::new(None, String::from("my_org"), String::from("my_repo"), None, None, None, None, Some(100), None);
-
source

pub(crate) async fn main<'octo>(&self, action: Action) -> Result<Issue, &str>

Instantiate a reusable Octocrab issues object with input authentication, and an input owner and repo.

+
source

pub(crate) async fn main<'octo>(&self, action: Action) -> Result<Issue, &str>

Instantiate a reusable Octocrab issues object with input authentication, and an input owner and repo.

Examples
let issue = gh_issue.main(Action::Read).await?;
-
source

async fn create<'octo>( +

source

async fn create<'octo>( &self, issues: IssueHandler<'octo> -) -> Result<Issue, &str>

source

async fn read<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>

source

async fn list<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>

source

async fn update<'octo>( +) -> Result<Issue, &str>

source

async fn read<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>

source

async fn list<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>

source

async fn update<'octo>( &self, issues: IssueHandler<'octo> -) -> Result<Issue, &str>

Trait Implementations§

source§

impl<'issue> Debug for Issue<'issue>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'issue> PartialEq for Issue<'issue>

source§

fn eq(&self, other: &Issue<'issue>) -> bool

This method tests for self and other values to be equal, and is used +) -> Result<Issue, &str>

Trait Implementations§

source§

impl<'issue> Debug for Issue<'issue>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'issue> PartialEq for Issue<'issue>

source§

fn eq(&self, other: &Issue<'issue>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always -sufficient, and should not be overridden without very good reason.
source§

impl<'issue> Eq for Issue<'issue>

source§

impl<'issue> StructuralEq for Issue<'issue>

source§

impl<'issue> StructuralPartialEq for Issue<'issue>

Auto Trait Implementations§

§

impl<'issue> RefUnwindSafe for Issue<'issue>

§

impl<'issue> Send for Issue<'issue>

§

impl<'issue> Sync for Issue<'issue>

§

impl<'issue> Unpin for Issue<'issue>

§

impl<'issue> UnwindSafe for Issue<'issue>

Blanket Implementations§

source§

impl<T> Any for Twhere +sufficient, and should not be overridden without very good reason.

source§

impl<'issue> Eq for Issue<'issue>

source§

impl<'issue> StructuralEq for Issue<'issue>

source§

impl<'issue> StructuralPartialEq for Issue<'issue>

Auto Trait Implementations§

§

impl<'issue> RefUnwindSafe for Issue<'issue>

§

impl<'issue> Send for Issue<'issue>

§

impl<'issue> Sync for Issue<'issue>

§

impl<'issue> Unpin for Issue<'issue>

§

impl<'issue> UnwindSafe for Issue<'issue>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/doc/index.html b/doc/index.html index 9bdaeff..d0b7b61 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,2 +1,2 @@ -concourse_github_issue - Rust

Modules

Structs

Functions

\ No newline at end of file +concourse_github_issue - Rust

Modules

Structs

Functions

\ No newline at end of file diff --git a/doc/struct.GithubIssue.html b/doc/struct.GithubIssue.html index 99e584b..89529ec 100644 --- a/doc/struct.GithubIssue.html +++ b/doc/struct.GithubIssue.html @@ -1,4 +1,4 @@ -GithubIssue in concourse_github_issue - Rust
pub(crate) struct GithubIssue {}

Trait Implementations§

source§

impl Resource for GithubIssue

source§

fn resource_check( +GithubIssue in concourse_github_issue - Rust
pub(crate) struct GithubIssue {}

Trait Implementations§

source§

impl Resource for GithubIssue

source§

fn resource_check( source: Option<Self::Source>, _version: Option<Self::Version> ) -> Vec<Self::Version>

Performs the check step for the resource. Returns a single sized vector of version of state string if the input issue is Open (no trigger), and a two sized vector of version of state string if the input issue is closed (trigger). For convenience and standardization the former return is “Open”, and the latter is “Open” and “Closed”.

@@ -8,7 +8,7 @@ _params: Option<Self::InParams>, _output_path: &str ) -> Result<InOutput<Self::Version, Self::InMetadata>, Box<dyn Error>>

Dummies the in step as it performs no functionality.

-
source§

fn resource_out( +

source§

fn resource_out( source: Option<Self::Source>, params: Option<Self::OutParams>, input_path: &str