Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit ecb6f92

Browse files
committed
Move check to subscription
1 parent 71e9061 commit ecb6f92

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

datalog/subscription/on_push.edn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@
3636
[?file :git.file/path ?file-path]
3737
(string-match ?file-path "go\\.mod" _)
3838

39+
;; filter out pushes to our atomist/ branches
40+
[?ref :git.ref/commit ?commit]
41+
[?ref :git.ref/type :git.ref.type/branch]
42+
[?ref :git.ref/name ?branch]
43+
(not (string-match ?branch "^atomist\\/" _))
44+
3945
;; check repo filter
4046
[?commit :git.commit/repo ?repo]
4147
(skill-repo-selected? ?ctx ?repo)]

lib/events.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import {
18-
EventHandler,
19-
github,
20-
repository,
21-
status,
22-
subscription,
23-
} from "@atomist/skill";
17+
import { EventHandler, github, repository, subscription } from "@atomist/skill";
2418

2519
export const on_push: EventHandler<
2620
[subscription.datalog.OnPush]
@@ -32,10 +26,6 @@ export const on_push: EventHandler<
3226
r => r["git.ref/type"]["db/ident"] === "git.ref.type/branch",
3327
)?.["git.ref/name"];
3428

35-
if (!branch || branch.startsWith("atomist/")) {
36-
return status.completed(`Ignoring missing or atomist branch`);
37-
}
38-
3929
const p = await ctx.project.clone(
4030
repository.gitHub({
4131
owner: org["git.org/name"],

0 commit comments

Comments
 (0)