diff --git a/NAMESPACE b/NAMESPACE index 2e3b17bf..5a095336 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -10,8 +10,8 @@ export(dependencies_to_sdsmj) export(download_bugzilla_perceval_rest_issue_comments) export(download_bugzilla_perceval_traditional_issue_comments) export(download_bugzilla_rest_comments) -export(download_bugzilla_rest_issues) export(download_bugzilla_rest_issues_comments) +export(download_bugzilla_rest_issues_comments_by_date) export(download_jira_issues) export(download_jira_issues_by_date) export(download_jira_issues_by_issue_key) @@ -104,6 +104,7 @@ export(motif_factory_anti_triangle) export(motif_factory_square) export(motif_factory_triangle) export(normalized_levenshtein) +export(parse_bugzilla_latest_date) export(parse_bugzilla_perceval_rest_issue_comments) export(parse_bugzilla_perceval_traditional_issue_comments) export(parse_bugzilla_rest_comments) @@ -137,6 +138,7 @@ export(query_src_text_class_names) export(query_src_text_namespace) export(read_temporary_file) export(recolor_network_by_community) +export(refresh_bugzilla_issues_comments) export(refresh_jira_issues) export(smell_missing_links) export(smell_organizational_silo) diff --git a/man/download_bugzilla_rest_issues.Rd b/man/download_bugzilla_rest_issues.Rd deleted file mode 100644 index 8906d7ad..00000000 --- a/man/download_bugzilla_rest_issues.Rd +++ /dev/null @@ -1,40 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/bugzilla.R -\name{download_bugzilla_rest_issues} -\alias{download_bugzilla_rest_issues} -\title{Download Bugzilla issues using the Bugzilla REST API} -\usage{ -download_bugzilla_rest_issues( - bugzilla_site, - start_timestamp, - save_folder_path, - limit_upperbound = 500 -) -} -\arguments{ -\item{bugzilla_site}{URL to specific bugzilla site} - -\item{start_timestamp}{when to start bug retrieval (ex. 2023-01-01T00:14:57Z)} - -\item{save_folder_path}{the full *folder* path where the bugzilla issues will be stored} - -\item{limit_upperbound}{the number of issues saved in each page file. Some bugzilla sites have limits set on how many bugs -can be retrieved in one GET request, in which case, the limit set by the bugzilla site will be used in place of -limit_upperbound to ensure full bug retrieval.} -} -\value{ -a vector of bug ids -} -\description{ -Downloads bugzilla issues into a folder, where each file is a json containing a page of issues. -Returns a list of bugzilla bug ids for use with \code{\link{download_bugzilla_rest_comments}}. -} -\details{ -Note that some bugzilla sites limit the bugs that can retrieved in a single GET request. -The limit_upperbound you set to retrieve a number of bugs for each page/file may be greater -than the limit set for bug retrieval by the bugzilla site, in which case, this function -will adjust the limit accordingly to ensure all bugs are retrieved. -} -\seealso{ -\code{\link{download_bugzilla_rest_comments}} a downloader function to download the issue comments -} diff --git a/man/download_bugzilla_rest_issues_comments.Rd b/man/download_bugzilla_rest_issues_comments.Rd index 92e7ffca..fa6ec550 100644 --- a/man/download_bugzilla_rest_issues_comments.Rd +++ b/man/download_bugzilla_rest_issues_comments.Rd @@ -2,29 +2,41 @@ % Please edit documentation in R/bugzilla.R \name{download_bugzilla_rest_issues_comments} \alias{download_bugzilla_rest_issues_comments} -\title{Download project data (issues and comments) from bugzilla site -Note: The first comment in every issue is the issue description} +\title{Download Bugzilla Issues and Issues Comments Using REST API} \usage{ download_bugzilla_rest_issues_comments( bugzilla_site, - start_timestamp, + query, save_folder_path, - limit_upperbound = 500 + project_key, + limit_upperbound = 20, + comments = FALSE, + verbose = FALSE ) } \arguments{ \item{bugzilla_site}{URL to specific bugzilla site} -\item{start_timestamp}{when to start bug retrieval (ex. 2023-01-01T00:14:57Z)} +\item{query}{an API parameter that modifies the GET request} -\item{save_folder_path}{the full *folder* path where the bugzilla issues will be stored} +\item{save_folder_path}{the full folder path where the bugzilla issues will be stored} + +\item{project_key}{the project key of the project which can be found in the respective config file} \item{limit_upperbound}{the number of issues saved in each page file. Some bugzilla sites have limits set on how many bugs can be retrieved in one GET request, in which case, the limit set by the bugzilla site will be used in place of limit_upperbound to ensure full bug retrieval.} + +\item{comments}{set true to download issues with comments, leave as false to download only issues (without comments)} + +\item{verbose}{set true to print execution details} } \description{ -Download project data (issues and comments) from bugzilla site +Downloads Bugzilla issues or issues with comments into a folder, where each file is a +json containing a page of issues. Returns the content from the API call. +} +\details{ +Download project data (issues or issues and comments) from bugzilla site Note: The first comment in every issue is the issue description } \seealso{ diff --git a/man/download_bugzilla_rest_issues_comments_by_date.Rd b/man/download_bugzilla_rest_issues_comments_by_date.Rd new file mode 100644 index 00000000..fd582301 --- /dev/null +++ b/man/download_bugzilla_rest_issues_comments_by_date.Rd @@ -0,0 +1,41 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bugzilla.R +\name{download_bugzilla_rest_issues_comments_by_date} +\alias{download_bugzilla_rest_issues_comments_by_date} +\title{Download Bugzilla Issues and Issues Comments By Date Using REST API} +\usage{ +download_bugzilla_rest_issues_comments_by_date( + bugzilla_site, + start_timestamp, + save_folder_path, + project_key, + limit_upperbound = 20, + comments = FALSE, + verbose = FALSE +) +} +\arguments{ +\item{bugzilla_site}{URL to specific bugzilla site} + +\item{start_timestamp}{when to start bug retrieval (ex. 2023-01-01T00:14:57Z)} + +\item{save_folder_path}{the full folder path where the bugzilla issues will be stored} + +\item{project_key}{the project key of the project which can be found in the respective config file} + +\item{limit_upperbound}{the number of issues saved in each page file. Some bugzilla sites have limits set on how many bugs +can be retrieved in one GET request, in which case, the limit set by the bugzilla site will be used in place of +limit_upperbound to ensure full bug retrieval.} + +\item{comments}{set true to download issues with comments, leave as false to download only issues (without comments)} + +\item{verbose}{set true to print execution details} +} +\description{ +Downloads Bugzilla issues or issues with comments into a folder, where each file is a +json containing a page of issues. The files downloaded start from the "start_timestamp" parameter +until the current time. +} +\seealso{ +\code{\link{parse_bugzilla_rest_issues_comments}} a parser function to parse Bugzilla issues and comments data +} diff --git a/man/parse_bugzilla_latest_date.Rd b/man/parse_bugzilla_latest_date.Rd new file mode 100644 index 00000000..be55bb39 --- /dev/null +++ b/man/parse_bugzilla_latest_date.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bugzilla.R +\name{parse_bugzilla_latest_date} +\alias{parse_bugzilla_latest_date} +\title{Parse Bugzilla current issue} +\usage{ +parse_bugzilla_latest_date(json_folder_path) +} +\arguments{ +\item{json_folder_path}{path to save folder containing JIRA issue and/or comments json files.} +} +\value{ +The name of the Bugzilla issue file with the latest created date that was created/downloaded for +use by the bugzilla downloader refresher +} +\description{ +Returns the file containing the most current issue in the specified folder. +} +\details{ +The folder assumes the following convention: "(PROJECTKEY)_(uniextimestamp_lowerbound)_(unixtimestamp_upperbound).json" +For example: "SAILUH_1231234_2312413.json". This nomenclature is defined by \code{\link{download_jira_issues}}. +} +\seealso{ +Other parsers: +\code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, +\code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, +\code{\link{parse_bugzilla_rest_comments}()}, +\code{\link{parse_bugzilla_rest_issues_comments}()}, +\code{\link{parse_bugzilla_rest_issues}()}, +\code{\link{parse_commit_message_id}()}, +\code{\link{parse_dependencies}()}, +\code{\link{parse_dv8_clusters}()}, +\code{\link{parse_gitlog}()}, +\code{\link{parse_jira_latest_date}()}, +\code{\link{parse_jira_rss_xml}()}, +\code{\link{parse_jira}()}, +\code{\link{parse_mbox}()}, +\code{\link{parse_nvdfeed}()} +} +\concept{parsers} diff --git a/man/parse_bugzilla_perceval_rest_issue_comments.Rd b/man/parse_bugzilla_perceval_rest_issue_comments.Rd index d8788d60..739224ea 100644 --- a/man/parse_bugzilla_perceval_rest_issue_comments.Rd +++ b/man/parse_bugzilla_perceval_rest_issue_comments.Rd @@ -24,6 +24,7 @@ Parse Bugzilla data obtained from Perceval REST API Bugzilla backend \code{\link{download_bugzilla_perceval_rest_issue_comments}} a donwoloader function download bugzilla data with perceval Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, \code{\link{parse_bugzilla_rest_issues_comments}()}, diff --git a/man/parse_bugzilla_perceval_traditional_issue_comments.Rd b/man/parse_bugzilla_perceval_traditional_issue_comments.Rd index 06f9397d..82334ba3 100644 --- a/man/parse_bugzilla_perceval_traditional_issue_comments.Rd +++ b/man/parse_bugzilla_perceval_traditional_issue_comments.Rd @@ -24,6 +24,7 @@ Parse Bugzilla data obtained from Perceval traditional Bugzilla backend \code{\link{download_bugzilla_perceval_traditional_issue_comments}} a downloader function to download bugzilla data with perceval Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, \code{\link{parse_bugzilla_rest_issues_comments}()}, diff --git a/man/parse_bugzilla_rest_comments.Rd b/man/parse_bugzilla_rest_comments.Rd index 8121d873..4385da8a 100644 --- a/man/parse_bugzilla_rest_comments.Rd +++ b/man/parse_bugzilla_rest_comments.Rd @@ -17,6 +17,7 @@ Parse Bugzilla comments data obtained from json files from Bugzilla crawler \cod } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_issues_comments}()}, diff --git a/man/parse_bugzilla_rest_issues.Rd b/man/parse_bugzilla_rest_issues.Rd index 69d55e6b..6c3d9e82 100644 --- a/man/parse_bugzilla_rest_issues.Rd +++ b/man/parse_bugzilla_rest_issues.Rd @@ -19,6 +19,7 @@ Parse Bugzilla issues data obtained from json files from Bugzilla crawler \code{\link{download_bugzilla_rest_issues_comments}} a downloader function to parse Bugzilla issues and comments data Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_bugzilla_rest_issues_comments.Rd b/man/parse_bugzilla_rest_issues_comments.Rd index 68939e2c..73e33400 100644 --- a/man/parse_bugzilla_rest_issues_comments.Rd +++ b/man/parse_bugzilla_rest_issues_comments.Rd @@ -13,7 +13,10 @@ parse_bugzilla_rest_issues_comments(bugzilla_folder_path) data table with Bugzilla issue data and Bugzilla comments data } \description{ -Parse Bugzilla issues and comments data table +When comments data is present, every row in the returned table +is uniquely identified by the `issue_key` and `comment_id` column. +When comment data is not present, every row is uniquely identified by the +`issue_key` colummn. } \seealso{ \code{\link{parse_bugzilla_rest_issues}} a parser function to parse Bugzilla issues data @@ -21,6 +24,7 @@ Parse Bugzilla issues and comments data table \code{\link{download_bugzilla_rest_issues_comments}} a downloader function to parse Bugzilla issues and comments data Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_commit_message_id.Rd b/man/parse_commit_message_id.Rd index 1fe5fd3f..c3804d6f 100644 --- a/man/parse_commit_message_id.Rd +++ b/man/parse_commit_message_id.Rd @@ -16,6 +16,7 @@ Adds a column commit_message_id containing the parsed commit message } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_dependencies.Rd b/man/parse_dependencies.Rd index 9cd9d487..74dff15d 100644 --- a/man/parse_dependencies.Rd +++ b/man/parse_dependencies.Rd @@ -25,6 +25,7 @@ Parse dependencies from Depends } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_dv8_clusters.Rd b/man/parse_dv8_clusters.Rd index 474205be..9af52c42 100644 --- a/man/parse_dv8_clusters.Rd +++ b/man/parse_dv8_clusters.Rd @@ -14,6 +14,7 @@ Parses a cluster *-clsx.json into a data table. } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_gitlog.Rd b/man/parse_gitlog.Rd index 5552e83c..ce0b9c8c 100644 --- a/man/parse_gitlog.Rd +++ b/man/parse_gitlog.Rd @@ -20,6 +20,7 @@ Parses the `.git` file in a github repository using the Perceval library. } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_jira.Rd b/man/parse_jira.Rd index 26b2da1f..17e02364 100644 --- a/man/parse_jira.Rd +++ b/man/parse_jira.Rd @@ -30,6 +30,7 @@ If a field is not present in an issue, then its value will be NA. } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_jira_latest_date.Rd b/man/parse_jira_latest_date.Rd index f5b8b18f..a5c92942 100644 --- a/man/parse_jira_latest_date.Rd +++ b/man/parse_jira_latest_date.Rd @@ -22,6 +22,7 @@ For example: "SAILUH_1231234_2312413.json". This nomenclature is defined by \cod } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_jira_rss_xml.Rd b/man/parse_jira_rss_xml.Rd index 38bb6948..40e4020a 100644 --- a/man/parse_jira_rss_xml.Rd +++ b/man/parse_jira_rss_xml.Rd @@ -25,6 +25,7 @@ in IEEE Transactions on Software Engineering, vol. 48, no. 8, pp. 3159-3184, } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_mbox.Rd b/man/parse_mbox.Rd index f048bd48..eda32a8a 100644 --- a/man/parse_mbox.Rd +++ b/man/parse_mbox.Rd @@ -20,6 +20,7 @@ consistently renamed for clarity. } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/parse_nvdfeed.Rd b/man/parse_nvdfeed.Rd index e861f2a3..232d2e6e 100644 --- a/man/parse_nvdfeed.Rd +++ b/man/parse_nvdfeed.Rd @@ -15,6 +15,7 @@ Parse NVD Feed CVEs, descriptions and CWE ids } \seealso{ Other parsers: +\code{\link{parse_bugzilla_latest_date}()}, \code{\link{parse_bugzilla_perceval_rest_issue_comments}()}, \code{\link{parse_bugzilla_perceval_traditional_issue_comments}()}, \code{\link{parse_bugzilla_rest_comments}()}, diff --git a/man/refresh_bugzilla_issues_comments.Rd b/man/refresh_bugzilla_issues_comments.Rd new file mode 100644 index 00000000..59c7afca --- /dev/null +++ b/man/refresh_bugzilla_issues_comments.Rd @@ -0,0 +1,41 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/bugzilla.R +\name{refresh_bugzilla_issues_comments} +\alias{refresh_bugzilla_issues_comments} +\title{Refresh Bugzilla Issues or Issues Comments} +\usage{ +refresh_bugzilla_issues_comments( + bugzilla_site, + start_timestamp = "1970-01-01T:00:00:00Z", + save_folder_path, + project_key, + limit_upperbound = 20, + comments = FALSE, + verbose = FALSE +) +} +\arguments{ +\item{bugzilla_site}{URL to specific bugzilla site} + +\item{start_timestamp}{When to start bug retrieval (ex. 2023-01-01T00:14:57Z). When not specified, the start timestamp +will begin from the first issue of the issue tracker closest to 1970.} + +\item{save_folder_path}{the full folder path where the bugzilla issues will be stored} + +\item{project_key}{the project key of the project which can be found in the respective config file} + +\item{limit_upperbound}{the number of issues saved in each page file. Some bugzilla sites have limits set on how many bugs +can be retrieved in one GET request, in which case, the limit set by the bugzilla site will be used in place of +limit_upperbound to ensure full bug retrieval.} + +\item{comments}{set true to download issues with comments, leave as false to download only issues (without comments)} + +\item{verbose}{set true to print execution details} +} +\description{ +Downloads Bugzilla issues or issues with comments starting from the most recent file in the folder. +If the directory is empty, then all issues will be downloaded for the Bugzilla project. +} +\seealso{ +\code{\link{parse_bugzilla_rest_issues_comments}} a parser function to parse Bugzilla issues and comments data +}