fbe 0.0.56 → 0.0.57
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fbe/octo.rb +191 -16
- data/lib/fbe.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed6340a5cdc2dc6fa780e0548d52da19dd8700d770179b7af7b0ea93d743d0c0
|
4
|
+
data.tar.gz: 02c2c48dca7e2b75c52e188f2796c7ed6f61d2509f8ccb0956c2b918dfe5b674
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f26b5f1447c4addf6892de639fe665d18d3cfd6089c209dce5986d5caa45efca71902b69e33bdafdbc705945359e94d538bc331ccb9f2c92e93b843bc4792c2
|
7
|
+
data.tar.gz: 76e0740eaed590150154c16ddc42b41c32360951dae668b8fb2c8c28d6d81050764012ab4ef2bdf40ba5abea158c0df4b6dade1b924680cbc9190068869f0296
|
data/lib/fbe/octo.rb
CHANGED
@@ -181,21 +181,6 @@ class Fbe::FakeOctokit
|
|
181
181
|
}
|
182
182
|
end
|
183
183
|
|
184
|
-
def workflow_run(repo, id)
|
185
|
-
{
|
186
|
-
id:,
|
187
|
-
name: 'copyrights',
|
188
|
-
head_branch: 'master',
|
189
|
-
head_sha: '7d34c53e6743944dbf6fc729b1066bcbb3b18443',
|
190
|
-
event: 'push',
|
191
|
-
status: 'completed',
|
192
|
-
conclusion: 'success',
|
193
|
-
workflow_id: id,
|
194
|
-
created_at: random_time,
|
195
|
-
repository: repository(repo)
|
196
|
-
}
|
197
|
-
end
|
198
|
-
|
199
184
|
def workflow_run_usage(_repo, _id)
|
200
185
|
{
|
201
186
|
billable: {
|
@@ -541,7 +526,8 @@ class Fbe::FakeOctokit
|
|
541
526
|
}
|
542
527
|
},
|
543
528
|
head: {
|
544
|
-
ref: 'zerocracy/baza'
|
529
|
+
ref: 'zerocracy/baza',
|
530
|
+
sha: '74d0c234967de0f690805c6943e78db42a294c1a'
|
545
531
|
},
|
546
532
|
merged_at: Time.now,
|
547
533
|
comments: 2,
|
@@ -701,4 +687,193 @@ class Fbe::FakeOctokit
|
|
701
687
|
}
|
702
688
|
]
|
703
689
|
end
|
690
|
+
|
691
|
+
def check_runs_for_ref(_repo, sha)
|
692
|
+
{
|
693
|
+
total_count: 7,
|
694
|
+
check_runs: [
|
695
|
+
{
|
696
|
+
id: 28_907_016_501,
|
697
|
+
name: 'make',
|
698
|
+
head_sha: sha,
|
699
|
+
started_at: '2024-08-18T08:04:44Z',
|
700
|
+
completed_at: '2024-08-18T08:20:17Z'
|
701
|
+
},
|
702
|
+
{
|
703
|
+
id: 28_906_596_603,
|
704
|
+
name: 'copyrights',
|
705
|
+
head_sha: sha,
|
706
|
+
started_at: '2024-08-18T08:04:44Z',
|
707
|
+
completed_at: '2024-08-18T08:20:17Z'
|
708
|
+
},
|
709
|
+
{
|
710
|
+
id: 28_906_596_550,
|
711
|
+
name: 'markdown-lint',
|
712
|
+
head_sha: sha,
|
713
|
+
started_at: '2024-08-18T08:04:44Z',
|
714
|
+
completed_at: '2024-08-18T08:20:17Z'
|
715
|
+
},
|
716
|
+
{
|
717
|
+
id: 28_906_596_483,
|
718
|
+
name: 'pdd',
|
719
|
+
head_sha: sha,
|
720
|
+
started_at: '2024-08-18T08:04:44Z',
|
721
|
+
completed_at: '2024-08-18T08:20:17Z'
|
722
|
+
},
|
723
|
+
{
|
724
|
+
id: 28_906_596_433,
|
725
|
+
name: 'rake',
|
726
|
+
head_sha: sha,
|
727
|
+
started_at: '2024-08-18T08:04:44Z',
|
728
|
+
completed_at: '2024-08-18T08:20:17Z'
|
729
|
+
},
|
730
|
+
{
|
731
|
+
id: 28_906_596_405,
|
732
|
+
name: 'shellcheck',
|
733
|
+
head_sha: sha,
|
734
|
+
started_at: '2024-08-18T08:04:44Z',
|
735
|
+
completed_at: '2024-08-18T08:20:17Z'
|
736
|
+
},
|
737
|
+
{
|
738
|
+
id: 28_906_596_379,
|
739
|
+
name: 'yamllint',
|
740
|
+
head_sha: sha,
|
741
|
+
started_at: '2024-08-18T08:04:44Z',
|
742
|
+
completed_at: '2024-08-18T08:20:17Z'
|
743
|
+
}
|
744
|
+
]
|
745
|
+
}
|
746
|
+
end
|
747
|
+
|
748
|
+
def workflow_run_job(_repo, job)
|
749
|
+
result = [
|
750
|
+
{
|
751
|
+
id: 28_907_016_501,
|
752
|
+
run_id: 10_438_531_072,
|
753
|
+
name: 'make',
|
754
|
+
started_at: '2024-08-18T08:04:44Z',
|
755
|
+
completed_at: '2024-08-18T08:20:17Z'
|
756
|
+
},
|
757
|
+
{
|
758
|
+
id: 28_906_596_603,
|
759
|
+
run_id: 10_438_531_073,
|
760
|
+
name: 'copyrights',
|
761
|
+
started_at: '2024-08-18T08:04:44Z',
|
762
|
+
completed_at: '2024-08-18T08:20:17Z'
|
763
|
+
},
|
764
|
+
{
|
765
|
+
id: 28_906_596_550,
|
766
|
+
run_id: 10_438_531_074,
|
767
|
+
name: 'markdown-lint',
|
768
|
+
started_at: '2024-08-18T08:04:44Z',
|
769
|
+
completed_at: '2024-08-18T08:20:17Z'
|
770
|
+
},
|
771
|
+
{
|
772
|
+
id: 28_906_596_483,
|
773
|
+
run_id: 10_438_531_075,
|
774
|
+
name: 'pdd',
|
775
|
+
started_at: '2024-08-18T08:04:44Z',
|
776
|
+
completed_at: '2024-08-18T08:20:17Z'
|
777
|
+
},
|
778
|
+
{
|
779
|
+
id: 28_906_596_433,
|
780
|
+
run_id: 10_438_531_076,
|
781
|
+
name: 'rake',
|
782
|
+
started_at: '2024-08-18T08:04:44Z',
|
783
|
+
completed_at: '2024-08-18T08:20:17Z'
|
784
|
+
},
|
785
|
+
{
|
786
|
+
id: 28_906_596_405,
|
787
|
+
run_id: 10_438_531_077,
|
788
|
+
name: 'shellcheck',
|
789
|
+
started_at: '2024-08-18T08:04:44Z',
|
790
|
+
completed_at: '2024-08-18T08:20:17Z'
|
791
|
+
},
|
792
|
+
{
|
793
|
+
id: 28_906_596_379,
|
794
|
+
run_id: 10_438_531_078,
|
795
|
+
name: 'yamllint',
|
796
|
+
started_at: '2024-08-18T08:04:44Z',
|
797
|
+
completed_at: '2024-08-18T08:20:17Z'
|
798
|
+
}
|
799
|
+
].select { |json| json[:id] == job }
|
800
|
+
result.first
|
801
|
+
end
|
802
|
+
|
803
|
+
def workflow_run(repo, id)
|
804
|
+
runs = [
|
805
|
+
{
|
806
|
+
id: 10_438_531_072,
|
807
|
+
event: 'pull_request',
|
808
|
+
conclusion: 'success',
|
809
|
+
name: 'make',
|
810
|
+
started_at: '2024-08-18T08:04:44Z',
|
811
|
+
completed_at: '2024-08-18T08:20:17Z'
|
812
|
+
},
|
813
|
+
{
|
814
|
+
id: 10_438_531_073,
|
815
|
+
event: 'pull_request',
|
816
|
+
conclusion: 'success',
|
817
|
+
name: 'copyrights',
|
818
|
+
started_at: '2024-08-18T08:04:44Z',
|
819
|
+
completed_at: '2024-08-18T08:20:17Z'
|
820
|
+
},
|
821
|
+
{
|
822
|
+
id: 10_438_531_074,
|
823
|
+
event: 'pull_request',
|
824
|
+
conclusion: 'success',
|
825
|
+
name: 'markdown-lint',
|
826
|
+
started_at: '2024-08-18T08:04:44Z',
|
827
|
+
completed_at: '2024-08-18T08:20:17Z'
|
828
|
+
},
|
829
|
+
{
|
830
|
+
id: 10_438_531_075,
|
831
|
+
event: 'pull_request',
|
832
|
+
conclusion: 'failure',
|
833
|
+
name: 'pdd',
|
834
|
+
started_at: '2024-08-18T08:04:44Z',
|
835
|
+
completed_at: '2024-08-18T08:20:17Z'
|
836
|
+
},
|
837
|
+
{
|
838
|
+
id: 10_438_531_076,
|
839
|
+
event: 'pull_request',
|
840
|
+
conclusion: 'success',
|
841
|
+
name: 'rake',
|
842
|
+
started_at: '2024-08-18T08:04:44Z',
|
843
|
+
completed_at: '2024-08-18T08:20:17Z'
|
844
|
+
},
|
845
|
+
{
|
846
|
+
id: 10_438_531_077,
|
847
|
+
event: 'commit',
|
848
|
+
conclusion: 'success',
|
849
|
+
name: 'shellcheck',
|
850
|
+
started_at: '2024-08-18T08:04:44Z',
|
851
|
+
completed_at: '2024-08-18T08:20:17Z'
|
852
|
+
},
|
853
|
+
{
|
854
|
+
id: 10_438_531_078,
|
855
|
+
event: 'pull_request',
|
856
|
+
conclusion: 'failure',
|
857
|
+
name: 'yamllint',
|
858
|
+
started_at: '2024-08-18T08:04:44Z',
|
859
|
+
completed_at: '2024-08-18T08:20:17Z'
|
860
|
+
}
|
861
|
+
].select { |json| json[:id] == id }
|
862
|
+
if runs.first.nil?
|
863
|
+
{
|
864
|
+
id:,
|
865
|
+
name: 'copyrights',
|
866
|
+
head_branch: 'master',
|
867
|
+
head_sha: '7d34c53e6743944dbf6fc729b1066bcbb3b18443',
|
868
|
+
event: 'push',
|
869
|
+
status: 'completed',
|
870
|
+
conclusion: 'success',
|
871
|
+
workflow_id: id,
|
872
|
+
created_at: random_time,
|
873
|
+
repository: repository(repo)
|
874
|
+
}
|
875
|
+
else
|
876
|
+
runs.first
|
877
|
+
end
|
878
|
+
end
|
704
879
|
end
|
data/lib/fbe.rb
CHANGED