-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit b22bdf5
Improve fork check in Git hooks installation
This change enforces that the repository name is "lab0-c" both locally
and on GitHub while ensuring it is correctly forked from
"sysprog21/lab0-c." It validates both the fork status and the parent
repository name using the GitHub API.
Modifications:
- Replaced grep and sed parsing with Git commands and awk for extracting
the repository owner and name.
- Added validation to ensure the repository name is "lab0-c."
- Improved fork verification by checking the GitHub API response for
both fork status and parent repository name.1 parent e83f2fb commit b22bdf5
1 file changed
+14
-14
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 | - | ||
34 | + | ||
35 | + | ||
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| |||
43 | 44 |
| |
44 | 45 |
| |
45 | 46 |
| |
46 | - | ||
47 | - | ||
48 | - | ||
49 | - | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
56 | - | ||
57 | - | ||
58 | - | ||
59 | - | ||
60 | - | ||
61 | - | ||
62 | - | ||
63 | - | ||
64 | - | ||
56 | + | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
|
0 commit comments