Create ghas-push-protection-resolve-block.prompt.md by nomdal · Pull Request #28 · github/awesome-copilot · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Create ghas-push-protection-resolve-block.prompt.md #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nomdal
Copy link

@nomdal nomdal commented Jul 2, 2025

This pull request introduces a new prompt file, ghas-push-protection-resolve-block.prompt.md, designed to assist developers in resolving blocked pushes caused by GitHub Advanced Security push protection. The prompt provides automated guidance for Copilot agent mode to help analyze errors, select resolution strategies, and ensure secure practices for handling secrets in code, all automatically with minimal developer intervention.

This pull request also updates the repo's README to include a link to this new prompt file.

I tested it in the following scenarios:

  • Most recent commit contains a secret and the push was blocked
  • Multiple previous commits contain secrets, though they were removed in most recent commit before the push was blocked
  • Multiple previous commits contain secrets, including the most recent commit, and the push was blocked

And the prompt was successful in all of them.

A prompt file for Copilot agent mode to assist with automating the removal of secrets after a GitHub Advanced Security push protection blocked push.
@Copilot Copilot AI review requested due to automatic review settings July 2, 2025 20:51
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new agent-mode prompt file to guide developers through resolving push blocks triggered by GitHub Advanced Security secret scanning.

  • Adds ghas-push-protection-resolve-block.prompt.md with automated analysis, strategy selection, and execution steps.
  • Defines error pattern recognition, resolution strategies (amend, rebase, multi-commit), and secret removal best practices.
  • Covers false-positive handling, merge-conflict guidance, and post-resolution verification.
Comments suppressed due to low confidence (4)

prompts/ghas-push-protection-resolve-block.prompt.md:4

  • [nitpick] Rephrase the frontmatter description for clarity, e.g.: "Help developers resolve pushes blocked by GitHub Advanced Security due to detected secrets."
description: "Help developers resolve GitHub Advanced Security push protection blocked pushes containing secrets"

prompts/ghas-push-protection-resolve-block.prompt.md:19

  • [nitpick] Convert the raw URL into a markdown link with descriptive text or split it across lines to improve readability, e.g., [Resolving a blocked push](<URL>).
    - Resolving a blocked push: https://docs.github.com/en/code-security/secret-scanning/working-with-secret-scanning-and-push-protection/working-with-push-protection-from-the-command-line#resolving-a-blocked-push

prompts/ghas-push-protection-resolve-block.prompt.md:24

  • Add a language identifier (e.g., ```text) to this code fence for error pattern recognition to enable proper syntax highlighting.
**prompts/ghas-push-protection-resolve-block.prompt.md:49**
* Include a sample command sequence or script snippet under the "Multiple Commits" strategy to match the level of detail provided for the other strategies.

Multiple Commits

</details>

tools: ["changes", "codebase", "editFiles", "problems", "terminal"]
description: "Help developers resolve GitHub Advanced Security push protection blocked pushes containing secrets"
---

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to add a level one header in here so that when the update script is run it will generate the correct name.

@@ -63,6 +63,9 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi
- [My Pull Requests](prompts/my-pull-requests.prompt.md)
- [C# Documentation Best Practices](prompts/csharp-docs.prompt.md) - Ensure that C# types are documented with XML comments and follow best practices for documentation.

### Security
- [Resolve a GitHub Advanced Security Push Protection blocked push] - Automate removing secrets from commit history
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description doesn't match the one in the prompt file. Ensure this is generated using the update-readme.js script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.