Skip to content
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

Add pull request creation on push error #232349

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

Conversation

akaday
Copy link

@akaday akaday commented Oct 27, 2024

Add functionality to create a pull request when a push is rejected due to permission issues.

  • extensions/github/src/pushErrorHandler.ts

    • Add a function createPullRequest to handle the creation of a pull request.
    • Modify handlePermissionDeniedError to call the new createPullRequest function.
    • Update findPullRequestTemplates to include additional directories (src and templates).
    • Adjust pickPullRequestTemplate to handle new template options.
  • extensions/github/src/test/github.test.ts

    • Add tests for the new createPullRequest function.
    • Update existing tests to cover the modified findPullRequestTemplates function.
    • Adjust tests for the pickPullRequestTemplate function to include new directories.

For more details, open the Copilot Workspace session.

Add functionality to create a pull request when a push is rejected due to permission issues.

* **extensions/github/src/pushErrorHandler.ts**
  - Add a function `createPullRequest` to handle the creation of a pull request.
  - Modify `handlePermissionDeniedError` to call the new `createPullRequest` function.
  - Update `findPullRequestTemplates` to include additional directories (`src` and `templates`).
  - Adjust `pickPullRequestTemplate` to handle new template options.

* **extensions/github/src/test/github.test.ts**
  - Add tests for the new `createPullRequest` function.
  - Update existing tests to cover the modified `findPullRequestTemplates` function.
  - Adjust tests for the `pickPullRequestTemplate` function to include new directories.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/vscode?shareId=XXXX-XXXX-XXXX-XXXX).
@lszomoru lszomoru added the github Github extension label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github Github extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants