Make getFiles not assume it has branch available

Currently, the getFiles action assumes that the state has details
available for the branch passed to it. It uses it to fetch its last
commit ID. This may or may not be the case. The action should
instead take another parameter `ref` to fetch commits by if
necessary.
185 jobs for !21805 with 36523-get-files-code-smell in 76 minutes and 18 seconds (queued for 6 seconds)
detached
Status Job ID Name Coverage
  Prepare
passed #386126732
docker gitlab-org
build-qa-image

00:03:39

passed #386126727
gitlab-org
compile-assets pull-cache

00:08:03

passed #386126729
gitlab-org
compile-assets pull-cache foss

00:08:41

manual #386126733
gitlab-org allowed to fail manual
manual:review-cleanup
passed #386126744
retrieve-tests-metadata

00:02:19

passed #386126741
gitlab-org
review-stop-failed-deployment

00:00:16

passed #386126731
gitlab-org
setup-test-env

00:07:58

 
  Test
passed #386126798
allowed to fail
code_quality

00:12:01

passed #386127047
gitlab-org
danger-review

00:04:06

passed #386127042
gitlab-org
db:check-schema

00:04:28

passed #386127043
gitlab-org
db:migrate-from-v11.11.0

00:12:18

passed #386127041
gitlab-org
db:migrate:reset

00:05:13

passed #386127044
gitlab-org
db:rollback

00:07:51

passed #386127046
gitlab-org
db:rollback geo

00:04:51

passed #386126802
allowed to fail
dependency_scanning

00:14:33

passed #386127040
gitlab-org
downtime_check

00:04:42

passed #386126751
docker gitlab-org
gitlab:assets:compile pull-cache

00:24:29

passed #386127045
gitlab-org
gitlab:setup

00:05:00

passed #386127048
gitlab-org
gitlab_git_test

00:01:11

passed #386126749
gitlab-org
graphql-reference-verify

00:05:09

passed #386126775
gitlab-org
jest

00:26:21

passed #386126778
gitlab-org
jest-foss

00:18:42

passed #386126754
gitlab-org
karma

00:16:57

76.85%
passed #386126758
gitlab-org
karma-foss

00:12:18

passed #386126791
gitlab-org
memory-on-boot

00:07:15

passed #386126789
gitlab-org
memory-static

00:06:26

passed #386126783
gitlab-org
qa-frontend-node:10

00:19:25

passed #386126781
gitlab-org
qa-frontend-node:8

00:20:10

passed #386126785
gitlab-org allowed to fail
qa-frontend-node:latest

00:21:15

passed #386126793
gitlab-org
qa:internal

00:02:35

passed #386126795
gitlab-org
qa:selectors

00:02:37

passed #386126797
gitlab-org
qa:selectors-foss

00:02:31

passed #386127037
gitlab-org
rspec fast_spec_helper

00:05:31

passed #386126896
gitlab-org
rspec integration pg9 1/6

00:21:10

passed #386126898
gitlab-org
rspec integration pg9 2/6

00:21:46

passed #386126899
gitlab-org
rspec integration pg9 3/6

00:21:31

passed #386126901
gitlab-org
rspec integration pg9 4/6

00:24:20

passed #386126903
gitlab-org
rspec integration pg9 5/6

00:23:42

passed #386126905
gitlab-org
rspec integration pg9 6/6

00:25:23

passed #386126906
gitlab-org
rspec integration pg9-foss 1/6

00:19:17

passed #386126908
gitlab-org
rspec integration pg9-foss 2/6

00:22:51

passed #386126912
gitlab-org
rspec integration pg9-foss 3/6

00:22:43

passed #386126916
gitlab-org
rspec integration pg9-foss 4/6

00:22:14

passed #386126919
gitlab-org
rspec integration pg9-foss 5/6

00:21:17

passed #386126922
gitlab-org
rspec integration pg9-foss 6/6

00:19:26

passed #386126803
gitlab-org
rspec migration pg9 1/4

00:09:06

passed #386126805
gitlab-org
rspec migration pg9 2/4

00:16:55

passed #386126808
gitlab-org
rspec migration pg9 3/4

00:20:42

passed #386126811
gitlab-org
rspec migration pg9 4/4

00:19:46

passed #386126813
gitlab-org
rspec migration pg9-foss 1/4

00:09:17

passed #386126815
gitlab-org
rspec migration pg9-foss 2/4

00:18:18

passed #386126817
gitlab-org
rspec migration pg9-foss 3/4

00:24:15

passed #386126819
gitlab-org
rspec migration pg9-foss 4/4

00:16:35

passed #386126924
gitlab-org
rspec system pg9 1/24

00:16:12

passed #386126941
gitlab-org
rspec system pg9 10/24

00:20:56

passed #386126943
gitlab-org
rspec system pg9 11/24

00:15:41

passed #386126945
gitlab-org
rspec system pg9 12/24

00:18:14

passed #386126947
gitlab-org
rspec system pg9 13/24

00:17:20

passed #386126949
gitlab-org
rspec system pg9 14/24

00:16:20

passed #386126951
gitlab-org
rspec system pg9 15/24

00:19:08

passed #386126953
gitlab-org
rspec system pg9 16/24

00:18:39

passed #386126956
gitlab-org
rspec system pg9 17/24

00:19:24

passed #386126959
gitlab-org
rspec system pg9 18/24

00:15:34

passed #386126962
gitlab-org
rspec system pg9 19/24

00:17:22

passed #386126927
gitlab-org
rspec system pg9 2/24

00:17:02

passed #386126965
gitlab-org
rspec system pg9 20/24

00:17:17

passed #386126968
gitlab-org
rspec system pg9 21/24

00:16:42

passed #386126970
gitlab-org
rspec system pg9 22/24

00:18:57

passed #386126972
gitlab-org
rspec system pg9 23/24

00:18:04

passed #386126973
gitlab-org
rspec system pg9 24/24

00:18:25

passed #386126928
gitlab-org
rspec system pg9 3/24

00:18:38

passed #386126930
gitlab-org
rspec system pg9 4/24

00:16:08

passed #386126931
gitlab-org
rspec system pg9 5/24

00:14:43

passed #386126933
gitlab-org
rspec system pg9 6/24

00:14:50

passed #386126935
gitlab-org
rspec system pg9 7/24

00:15:34

passed #386126937
gitlab-org
rspec system pg9 8/24

00:17:43

passed #386126939
gitlab-org
rspec system pg9 9/24

00:18:37

passed #386126974
gitlab-org
rspec system pg9-foss 1/24

00:13:16

passed #386126992
gitlab-org
rspec system pg9-foss 10/24

00:15:01

passed #386126994
gitlab-org
rspec system pg9-foss 11/24

00:14:47

passed #386126995
gitlab-org
rspec system pg9-foss 12/24

00:15:47

passed #386126997
gitlab-org
rspec system pg9-foss 13/24

00:13:17

passed #386126998
gitlab-org
rspec system pg9-foss 14/24

00:17:12

passed #386126999
gitlab-org
rspec system pg9-foss 15/24

00:16:51

passed #386127000
gitlab-org
rspec system pg9-foss 16/24

00:16:05

passed #386127002
gitlab-org
rspec system pg9-foss 17/24

00:16:47

passed #386127004
gitlab-org
rspec system pg9-foss 18/24

00:16:30

passed #386127005
gitlab-org
rspec system pg9-foss 19/24

00:15:05

passed #386126975
gitlab-org
rspec system pg9-foss 2/24

00:15:30

passed #386127006
gitlab-org
rspec system pg9-foss 20/24

00:16:53

passed #386127007
gitlab-org
rspec system pg9-foss 21/24

00:15:18

passed #386127008
gitlab-org
rspec system pg9-foss 22/24

00:16:57

passed #386127009
gitlab-org
rspec system pg9-foss 23/24

00:15:29

passed #386127010
gitlab-org
rspec system pg9-foss 24/24

00:16:51

passed #386126977
gitlab-org
rspec system pg9-foss 3/24

00:16:17

passed #386126978
gitlab-org
rspec system pg9-foss 4/24

00:16:54

passed #386126979
gitlab-org
rspec system pg9-foss 5/24

00:16:39

passed #386126981
gitlab-org
rspec system pg9-foss 6/24

00:15:38

passed #386126983
gitlab-org
rspec system pg9-foss 7/24

00:16:39

passed #386126986
gitlab-org
rspec system pg9-foss 8/24

00:16:22

passed #386126989
gitlab-org
rspec system pg9-foss 9/24

00:14:06

passed #386126821
gitlab-org
rspec unit pg9 1/20

00:23:46

passed #386126836
gitlab-org
rspec unit pg9 10/20

00:18:46

passed #386126838
gitlab-org
rspec unit pg9 11/20

00:17:06

passed #386126839
gitlab-org
rspec unit pg9 12/20

00:19:33

passed #386126841
gitlab-org
rspec unit pg9 13/20

00:19:28

passed #386126843
gitlab-org
rspec unit pg9 14/20

00:20:10

passed #386126846
gitlab-org
rspec unit pg9 15/20

00:19:09

passed #386126847
gitlab-org
rspec unit pg9 16/20

00:18:37

passed #386126849
gitlab-org
rspec unit pg9 17/20

00:17:44

passed #386126850
gitlab-org
rspec unit pg9 18/20

00:20:01

passed #386126852
gitlab-org
rspec unit pg9 19/20

00:20:24

passed #386126823
gitlab-org
rspec unit pg9 2/20

00:15:58

passed #386126853
gitlab-org
rspec unit pg9 20/20

00:19:09

passed #386126824
gitlab-org
rspec unit pg9 3/20

00:18:58

passed #386126826
gitlab-org
rspec unit pg9 4/20

00:16:55

passed #386126827
gitlab-org
rspec unit pg9 5/20

00:17:53

passed #386126829
gitlab-org
rspec unit pg9 6/20

00:18:52

passed #386126831
gitlab-org
rspec unit pg9 7/20

00:20:23

passed #386126832
gitlab-org
rspec unit pg9 8/20

00:17:06

passed #386126834
gitlab-org
rspec unit pg9 9/20

00:18:21

passed #386126856
gitlab-org
rspec unit pg9-foss 1/20

00:25:10

passed #386126875
gitlab-org
rspec unit pg9-foss 10/20

00:23:25

passed #386126876
gitlab-org
rspec unit pg9-foss 11/20

00:16:48

passed #386126878
gitlab-org
rspec unit pg9-foss 12/20

00:17:18

passed #386126880
gitlab-org
rspec unit pg9-foss 13/20

00:17:06

passed #386126881
gitlab-org
rspec unit pg9-foss 14/20

00:18:24

passed #386126883
gitlab-org
rspec unit pg9-foss 15/20

00:18:32

passed #386126885
gitlab-org
rspec unit pg9-foss 16/20

00:18:45

passed #386126888
gitlab-org
rspec unit pg9-foss 17/20

00:20:10

passed #386126890
gitlab-org
rspec unit pg9-foss 18/20

00:17:52

passed #386126893
gitlab-org
rspec unit pg9-foss 19/20

00:16:54

passed #386126859
gitlab-org
rspec unit pg9-foss 2/20

00:14:17

passed #386126895
gitlab-org
rspec unit pg9-foss 20/20

00:19:05

passed #386126861
gitlab-org
rspec unit pg9-foss 3/20

00:19:35

passed #386126863
gitlab-org
rspec unit pg9-foss 4/20

00:18:45

passed #386126864
gitlab-org
rspec unit pg9-foss 5/20

00:15:42

passed #386126867
gitlab-org
rspec unit pg9-foss 6/20

00:18:51

passed #386126869
gitlab-org
rspec unit pg9-foss 7/20

00:16:38

passed #386126871
gitlab-org
rspec unit pg9-foss 8/20

00:20:22

passed #386126873
gitlab-org
rspec unit pg9-foss 9/20

00:16:17

passed #386127035
gitlab-org
rspec-ee integration pg10 geo

00:08:51

passed #386127019
gitlab-org
rspec-ee integration pg9 1/3

00:17:05

passed #386127020
gitlab-org
rspec-ee integration pg9 2/3

00:18:29

passed #386127021
gitlab-org
rspec-ee integration pg9 3/3

00:18:57

passed #386127030
gitlab-org
rspec-ee integration pg9 geo

00:08:57

passed #386127011
gitlab-org
rspec-ee migration pg9 1/2

00:07:32

passed #386127012
gitlab-org
rspec-ee migration pg9 2/2

00:08:47

passed #386127036
gitlab-org
rspec-ee system pg10 geo

00:09:41

passed #386127022
gitlab-org
rspec-ee system pg9 1/5

00:16:36

passed #386127023
gitlab-org
rspec-ee system pg9 2/5

00:19:19

passed #386127024
gitlab-org
rspec-ee system pg9 3/5

00:21:29

passed #386127025
gitlab-org
rspec-ee system pg9 4/5

00:24:06

passed #386127026
gitlab-org
rspec-ee system pg9 5/5

00:20:09

passed #386127031
gitlab-org
rspec-ee system pg9 geo

00:07:57

passed #386127033
gitlab-org
rspec-ee unit pg10 geo 1/2

00:16:39

passed #386127034
gitlab-org
rspec-ee unit pg10 geo 2/2

00:15:43

passed #386127013
gitlab-org
rspec-ee unit pg9 1/5

00:24:11

passed #386127014
gitlab-org
rspec-ee unit pg9 2/5

00:23:50

passed #386127015
gitlab-org
rspec-ee unit pg9 3/5

00:25:58

passed #386127016
gitlab-org
rspec-ee unit pg9 4/5

00:28:44

passed #386127018
gitlab-org
rspec-ee unit pg9 5/5

00:26:16

passed #386127027
gitlab-org
rspec-ee unit pg9 geo 1/2

00:17:55

passed #386127029
gitlab-org
rspec-ee unit pg9 geo 2/2

00:17:45

passed #386127050
gitlab-org
run-dev-fixtures-ee

00:04:51

passed #386127049
gitlab-org
run-dev-fixtures-foss

00:04:57

failed #386126800
allowed to fail
sast

00:06:56

passed #386127038
gitlab-org
static-analysis 1/2

00:14:03

passed #386127039
gitlab-org
static-analysis 2/2

00:09:40

passed #386126787
gitlab-org
webpack-dev-server

00:06:33

 
  Post Test
passed #386127051
gitlab-org
coverage

00:08:18

97.46%
failed #386127052
gitlab-org allowed to fail
flaky-examples-check

00:04:50

 
  Review Prepare
passed #386127054
gitlab-org
review-build-cng

00:25:22

 
  Review
passed #386127055
gitlab-org allowed to fail
review-deploy

00:10:00

passed #386127056
gitlab-org allowed to fail manual
review-stop

00:00:29

 
  Qa
passed #386127058
allowed to fail
dast

00:07:56

manual #386127057
allowed to fail manual
package-and-qa-manual
passed #386127069
docker gitlab-org allowed to fail
review-performance

00:04:28

manual #386127060
docker gitlab-org allowed to fail manual
review-qa-all 1/5
manual #386127062
docker gitlab-org allowed to fail manual
review-qa-all 2/5
manual #386127063
docker gitlab-org allowed to fail manual
review-qa-all 3/5
manual #386127066
docker gitlab-org allowed to fail manual
review-qa-all 4/5
manual #386127068
docker gitlab-org allowed to fail manual
review-qa-all 5/5
passed #386127059
docker gitlab-org allowed to fail
review-qa-smoke

00:07:14

 
  Post Qa
manual #386127070
gitlab-org allowed to fail manual
parallel-spec-reports
 
Name Stage Failure
failed
flaky-examples-check Post Test
    "first_flaky_at": "2019-12-20 18:18:54 +0000",
"last_flaky_at": "2019-12-20 18:18:54 +0000",
"last_flaky_job": "https://gitlab.com/gitlab-org/gitlab/-/jobs/386126908"
}
}
Running after script...
$ date
Fri Dec 20 18:29:33 UTC 2019
ERROR: Job failed: exit code 1
failed
sast Test
exit status 1
2019/12/20 18:03:22 Container exited with non zero status code
Running after script...
$ date
Fri Dec 20 18:03:23 UTC 2019
Uploading artifacts...
WARNING: gl-sast-report.json: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1