List of all items
Structs
- GithubIssue
- concourse::OutMetadata
- concourse::OutParams
- concourse::Source
- concourse::Version
- github_issue::Issue
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 @@ -
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.
pub(crate) struct OutMetadata {
+OutMetadata in concourse_github_issue::concourse - Rust Struct concourse_github_issue::concourse::OutMetadata
source · 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
sourcepub(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
sourcepub(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§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 ==
.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 Struct concourse_github_issue::concourse::OutParams
source · pub(crate) struct OutParams {
+OutParams in concourse_github_issue::concourse - Rust Struct concourse_github_issue::concourse::OutParams
source · 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 Struct concourse_github_issue::concourse::Source
source · pub(crate) struct Source {
+Source in concourse_github_issue::concourse - Rust Struct concourse_github_issue::concourse::Source
source · 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 Struct concourse_github_issue::concourse::Version
source · pub(crate) struct Version {
+Version in concourse_github_issue::concourse - Rust Struct concourse_github_issue::concourse::Version
source · pub(crate) struct Version {
state: String,
}
Fields§
§state: String
Implementations§
source§impl Version
sourcepub(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 Function concourse_github_issue::main
source · pub(crate) fn main()
\ No newline at end of file
+main in concourse_github_issue - Rust Function concourse_github_issue::main
source · 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.Auto Trait Implementations§
§impl RefUnwindSafe for Action
§impl Send for Action
§impl Sync for Action
§impl Unpin for Action
§impl UnwindSafe for Action
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.Trait Implementations§
Auto Trait Implementations§
§impl RefUnwindSafe for Action
§impl Send for Action
§impl Sync for Action
§impl Unpin for Action
§impl UnwindSafe for Action
Blanket Implementations§
§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 Function concourse_github_issue::github_issue::str_to_issue_state
source · 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 Function concourse_github_issue::github_issue::str_to_issue_state
source · 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 Function concourse_github_issue::github_issue::str_to_params_state
source · 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 Function concourse_github_issue::github_issue::str_to_params_state
source · 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 Module concourse_github_issue::github_issue
source · Expand description
Github Issue
+concourse_github_issue::github_issue - Rust Module concourse_github_issue::github_issue
source · Expand description
Github Issue
github_issue
is a minimal utility to create and update issues within Github.
Structs
- Issue 🔒
Enums
- Action 🔒
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 Struct concourse_github_issue::github_issue::Issue
source · pub(crate) struct Issue<'issue> {
+Issue in concourse_github_issue::github_issue - Rust Struct concourse_github_issue::github_issue::Issue
source · 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>
sourcepub(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>
sourcepub(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);
-sourcepub(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.
+sourcepub(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?;
-sourceasync fn create<'octo>(
+
sourceasync fn create<'octo>(
&self,
issues: IssueHandler<'octo>
-) -> Result<Issue, &str>
sourceasync fn read<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>
sourceasync fn list<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>
sourceasync fn update<'octo>(
+) -> Result<Issue, &str>
sourceasync fn read<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>
sourceasync fn list<'octo>(&self, issues: IssueHandler<'octo>) -> Result<Issue, &str>
sourceasync fn update<'octo>(
&self,
issues: IssueHandler<'octo>
-) -> Result<Issue, &str>
Trait Implementations§
source§impl<'issue> PartialEq for Issue<'issue>
Trait Implementations§
source§impl<'issue> PartialEq for Issue<'issue>
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<'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> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read moresource§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
\ No newline at end of file
+concourse_github_issue - Rust
\ 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 Struct concourse_github_issue::GithubIssue
source · pub(crate) struct GithubIssue {}
Trait Implementations§
source§impl Resource for GithubIssue
source§fn resource_check(
+GithubIssue in concourse_github_issue - Rust Struct concourse_github_issue::GithubIssue
source · 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(
+