From a06ba3fe8ef14a7bc58147def76649296bf3eef1 Mon Sep 17 00:00:00 2001 From: Varun Gurnaney Date: Mon, 11 Jan 2021 13:49:15 -0800 Subject: [PATCH 1/2] Adding permalink to deploy csv_export Adding a column (permalink) to the export CSV functionality. I need for automation the SOC2 control C.24. In my automation, i would scanning through all the deploys and need the permalink for it Previously one could use any deploy number in the URL (regardless of the project parameter) to fetch the deploy page. I think this was fixed recently. --- app/models/deploy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/deploy.rb b/app/models/deploy.rb index df5725217c..75c1253588 100644 --- a/app/models/deploy.rb +++ b/app/models/deploy.rb @@ -213,7 +213,7 @@ def url def self.csv_header [ - "Deploy Number", "Project Name", "Deploy Summary", "Deploy Commit", "Deploy Status", "Deploy Updated", + "Deploy Number", "Project Name", "Permalink" "Deploy Summary", "Deploy Commit", "Deploy Status", "Deploy Updated", "Deploy Created", "Deployer Name", "Deployer Email", "Buddy Name", "Buddy Email", "Stage Name", "Production Flag", "Code deployed", "Project Deleted On", "Deploy Groups" ] @@ -221,7 +221,7 @@ def self.csv_header def csv_line [ - id, project.name, summary, commit, job.status, updated_at, start_time, user&.name, user&.email, + id, project.name, summary,project_permalink, commit, job.status, updated_at, start_time, user&.name, user&.email, buddy_name, buddy_email, stage.name, production, !stage.no_code_deployed, project.deleted_at, stage.deploy_group_names.join('|') ] From 3af9239684fee9e878c910ad84356a644e74df2f Mon Sep 17 00:00:00 2001 From: Nick Freeland Date: Tue, 4 May 2021 09:49:56 +1000 Subject: [PATCH 2/2] Fix styling --- app/models/deploy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/deploy.rb b/app/models/deploy.rb index 75c1253588..60e1e25519 100644 --- a/app/models/deploy.rb +++ b/app/models/deploy.rb @@ -213,7 +213,7 @@ def url def self.csv_header [ - "Deploy Number", "Project Name", "Permalink" "Deploy Summary", "Deploy Commit", "Deploy Status", "Deploy Updated", + "Deploy Number", "Project Name", "Permalink", "Deploy Summary", "Deploy Commit", "Deploy Status", "Deploy Updated", "Deploy Created", "Deployer Name", "Deployer Email", "Buddy Name", "Buddy Email", "Stage Name", "Production Flag", "Code deployed", "Project Deleted On", "Deploy Groups" ] @@ -221,7 +221,7 @@ def self.csv_header def csv_line [ - id, project.name, summary,project_permalink, commit, job.status, updated_at, start_time, user&.name, user&.email, + id, project.name, summary, project_permalink, commit, job.status, updated_at, start_time, user&.name, user&.email, buddy_name, buddy_email, stage.name, production, !stage.no_code_deployed, project.deleted_at, stage.deploy_group_names.join('|') ]