AZ-400 · Question #455
You manage source code control and versioning by using GitHub. You need to ensure that a PowerShell script is executed automatically before rebase operations are performed. What should you use?
The correct answer is C. a webhook. Explanation Webhooks (Option C) are the correct tool here because GitHub webhooks allow you to automatically trigger external scripts or services in response to specific repository events - including pre-rebase Git hook events - enabling a PowerShell script to execute automatical
Question
Options
- Aa package
- BGitHub Copilot
- Ca webhook
- Da gist
How the community answered
(65 responses)- A8% (5)
- B12% (8)
- C77% (50)
- D3% (2)
Explanation
Explanation
Webhooks (Option C) are the correct tool here because GitHub webhooks allow you to automatically trigger external scripts or services in response to specific repository events - including pre-rebase Git hook events - enabling a PowerShell script to execute automatically before a rebase operation is performed.
Why the distractors are wrong:
- A (Package): A package is a bundled collection of code/libraries for distribution, not a mechanism for triggering automated scripts on Git events.
- B (GitHub Copilot): Copilot is an AI-powered code completion assistant; it has no ability to trigger or automate scripts based on repository operations.
- D (Gist): A gist is simply a way to share code snippets or small files; it provides no event-driven execution capability.
Memory Tip: Think of a webhook as a "hook on the web" - just like Git hooks (e.g.,
pre-rebase) intercept local operations, webhooks intercept and respond to GitHub events in an automated, trigger-based way. If the question involves automatic execution in response to a Git/GitHub event, webhook is almost always the answer.
Topics
Community Discussion
No community discussion yet for this question.