2 # (c) Zachary T Welch <zw@superlucidity.net>
8 use lib
qw(/home/repo/repomgr/cgi);
11 my $repo = Git
::RepoCGI
->new('Create Watchdog');
12 my $project = $repo->sparam('project');
13 my $branch = $repo->sparam('branch');
14 my $path = $repo->sparam('path');
15 my $user = $repo->sparam('user');
17 # check for submission
18 if ($project && $user && $repo->sparam('go')) {
19 my $watch = Git
::RepoCGI
::Watch
->new($user, $project, $branch, $path);
20 $watch->add() or $repo->bye("Unable to create watchdog: $!");
21 $repo->bye("Watchdog created successfully.");
27 Using the form on this page, you may register a <i>watchdog</i> that
28 will monitor a project or fork for any changes. When activity occurs,
29 you will be sent a notification of the changes via e-mail. You can set
30 watchdogs to trigger for any change in the project, or you can restrict
31 them to monitor changes that occur on a specific branch or path in the
36 Once created, you can <a href="watchedit.cgi">access your watchdogs</a>
37 to view, update, or delete them. Users with push access to a project
38 can <a href="watchspam.cgi?project=$project&branch=$branch&path=$path">send
39 messages</a> to registered watchers of a particular fork, branch, or path.
42 <h2>Create a Watchdog</h2>
44 <p>Project: <input type="text" name="project" value="$project" /></p>
45 <p>Branch: <input type="text" name="branch" value="$branch" />
46 <sup>(optional)</sup></p>
47 <p>Path: <input type="text" name="path" value="$path" />
48 <sup>(optional)</sup></p>
50 <p>Account: <input type="text" name="user" value="$user" /></p>
51 <p>Password: <input type="password" name="cpwd" /></p>
52 <p><input type="submit" name="go" value="Watch" /></p>