From 7c90920ea113fa07379bed5731fc1d5ca7c8cb2e Mon Sep 17 00:00:00 2001 From: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> Date: Mon, 5 Jun 2023 12:55:06 -0500 Subject: [PATCH] :seedling: Deprecate dependencydiff package and add access token requirement - Deprecate the `dependencydiff` package and the `GetDependencyDiffResults` function - Add a line to the `.codecov.yml` to ignore the `dependencydiff` package Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> --- .codecov.yml | 2 ++ dependencydiff/dependencydiff.go | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 8185f5d689b7..91107317d501 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -12,6 +12,8 @@ ignore: - "docs/**/*" # this is the runner - "main.go" + # this package is deprecated and going to be removed. + - "dependencydiff/**/*" coverage: precision: 2 diff --git a/dependencydiff/dependencydiff.go b/dependencydiff/dependencydiff.go index ed0f97740926..fabd67e54925 100644 --- a/dependencydiff/dependencydiff.go +++ b/dependencydiff/dependencydiff.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Deprecated: This is going to be removed in the future. package dependencydiff import ( @@ -29,7 +30,9 @@ import ( ) // Depdiff is the exported name for dependency-diff. -const Depdiff = "Dependency-diff" +const ( + Depdiff = "Dependency-diff" +) // A private context struct used for GetDependencyCheckResults. type dependencydiffContext struct { @@ -50,6 +53,7 @@ type dependencydiffContext struct { // GetDependencyDiffResults gets dependency changes between two given code commits BASE and HEAD // along with the Scorecard check results of the dependencies, and returns a slice of DependencyCheckResult. // TO use this API, an access token must be set. See https://github.com/ossf/scorecard#authentication. +// Deprecated: This is going to be removed in the future. func GetDependencyDiffResults( ctx context.Context, repoURI string, /* Use the format "ownerName/repoName" as the repo URI, such as "ossf/scorecard". */