@@ -40,6 +40,8 @@ predicate containsHeadSHA(string s) {
40
40
"\\bgithub\\.event\\.check_run\\.check_suite\\.pull_requests\\[\\d+\\]\\.head\\.sha\\b" ,
41
41
"\\bgithub\\.event\\.check_run\\.head_sha\\b" ,
42
42
"\\bgithub\\.event\\.check_run\\.pull_requests\\[\\d+\\]\\.head\\.sha\\b" ,
43
+ "\\bgithub\\.event\\.merge_group\\.head_sha\\b" ,
44
+ "\\bgithub\\.event\\.merge_group\\.head_commit\\.id\\b" ,
43
45
// heuristics
44
46
"\\bhead\\.sha\\b" , "\\bhead_sha\\b" , "\\bpr_head_sha\\b"
45
47
] , _, _)
@@ -56,6 +58,7 @@ predicate containsHeadRef(string s) {
56
58
"\\bgithub\\.event\\.check_suite\\.pull_requests\\[\\d+\\]\\.head\\.ref\\b" ,
57
59
"\\bgithub\\.event\\.check_run\\.check_suite\\.pull_requests\\[\\d+\\]\\.head\\.ref\\b" ,
58
60
"\\bgithub\\.event\\.check_run\\.pull_requests\\[\\d+\\]\\.head\\.ref\\b" ,
61
+ "\\bgithub\\.event\\.merge_group\\.head_ref\\b" ,
59
62
// heuristics
60
63
"\\bhead\\.ref\\b" , "\\bhead_ref\\b" , "\\bpr_head_ref\\b" ,
61
64
// env vars
@@ -64,11 +67,17 @@ predicate containsHeadRef(string s) {
64
67
)
65
68
}
66
69
67
- /** Checkout of a Pull Request HEAD ref */
70
+ /** Checkout of a Pull Request HEAD */
68
71
abstract class PRHeadCheckoutStep extends Step { }
69
72
73
+ /** Checkout of a Pull Request HEAD ref */
74
+ abstract class MutableRefCheckoutStep extends PRHeadCheckoutStep { }
75
+
76
+ /** Checkout of a Pull Request HEAD ref */
77
+ abstract class SHACheckoutStep extends PRHeadCheckoutStep { }
78
+
70
79
/** Checkout of a Pull Request HEAD ref using actions/checkout action */
71
- class ActionsMutableRefCheckout extends PRHeadCheckoutStep instanceof UsesStep {
80
+ class ActionsMutableRefCheckout extends MutableRefCheckoutStep instanceof UsesStep {
72
81
ActionsMutableRefCheckout ( ) {
73
82
this .getCallee ( ) = "actions/checkout" and
74
83
(
@@ -102,7 +111,7 @@ class ActionsMutableRefCheckout extends PRHeadCheckoutStep instanceof UsesStep {
102
111
}
103
112
104
113
/** Checkout of a Pull Request HEAD ref using actions/checkout action */
105
- class ActionsSHACheckout extends PRHeadCheckoutStep instanceof UsesStep {
114
+ class ActionsSHACheckout extends SHACheckoutStep instanceof UsesStep {
106
115
ActionsSHACheckout ( ) {
107
116
this .getCallee ( ) = "actions/checkout" and
108
117
(
@@ -132,7 +141,7 @@ class ActionsSHACheckout extends PRHeadCheckoutStep instanceof UsesStep {
132
141
}
133
142
134
143
/** Checkout of a Pull Request HEAD ref using git within a Run step */
135
- class GitMutableRefCheckout extends PRHeadCheckoutStep instanceof Run {
144
+ class GitMutableRefCheckout extends MutableRefCheckoutStep instanceof Run {
136
145
GitMutableRefCheckout ( ) {
137
146
exists ( string line |
138
147
this .getScript ( ) .splitAt ( "\n" ) = line and
@@ -154,7 +163,7 @@ class GitMutableRefCheckout extends PRHeadCheckoutStep instanceof Run {
154
163
}
155
164
156
165
/** Checkout of a Pull Request HEAD ref using git within a Run step */
157
- class GitSHACheckout extends PRHeadCheckoutStep instanceof Run {
166
+ class GitSHACheckout extends SHACheckoutStep instanceof Run {
158
167
GitSHACheckout ( ) {
159
168
exists ( string line |
160
169
this .getScript ( ) .splitAt ( "\n" ) = line and
@@ -173,7 +182,7 @@ class GitSHACheckout extends PRHeadCheckoutStep instanceof Run {
173
182
}
174
183
175
184
/** Checkout of a Pull Request HEAD ref using gh within a Run step */
176
- class GhMutableRefCheckout extends PRHeadCheckoutStep instanceof Run {
185
+ class GhMutableRefCheckout extends MutableRefCheckoutStep instanceof Run {
177
186
GhMutableRefCheckout ( ) {
178
187
exists ( string line |
179
188
this .getScript ( ) .splitAt ( "\n" ) = line and
@@ -194,7 +203,7 @@ class GhMutableRefCheckout extends PRHeadCheckoutStep instanceof Run {
194
203
}
195
204
196
205
/** Checkout of a Pull Request HEAD ref using gh within a Run step */
197
- class GhSHACheckout extends PRHeadCheckoutStep instanceof Run {
206
+ class GhSHACheckout extends SHACheckoutStep instanceof Run {
198
207
GhSHACheckout ( ) {
199
208
exists ( string line |
200
209
this .getScript ( ) .splitAt ( "\n" ) = line and
0 commit comments