laurigates / gha-issue-resolution

Analyzes GitHub issues and provides AI-generated suggestions using Gemini
1 stars 0 forks source link

Submit pull requests with proposed changes #2

Closed laurigates closed 3 days ago

laurigates commented 3 days ago

When issues have at least one comment, use Gemini to process the issue with discussion included and submit a pull request with the necessary changes

github-actions[bot] commented 3 days ago
## AI-generated suggestion

Here's a potential solution to this issue, generated by an AI assistant:

## Detailed Solution

Code Changes:

- name: Submit pull request
  uses: actions/create-pull-request@v3
  with:
    title: "Resolve issues with discussion"
    body: "This pull request resolves the following issues:\n\n${{ steps.process_issues.outputs.issues }}"
    base: main
    head: ${{ github.branch }}
    issue_numbers: ${{ steps.process_issues.outputs.issue_numbers }}

Explanation:

The new Submit pull request step uses the create-pull-request action to create a pull request based on the information extracted by the process_issues step. The title and body of the pull request are set appropriately, and the base and head branches are specified.

Potential Side Effects or Considerations:

Implementation Recommendations

To implement this solution, you should:

  1. Add the new step to the .github/workflows/issue_resolution.yml workflow file.
  2. Test the workflow to ensure that it works as expected.
  3. Monitor the workflow to ensure that it continues to work correctly and does not cause any unexpected side effects.

    Please review this suggestion and let me know if you need any clarification or have any questions. This is an AI-generated response and may require human validation and testing before implementation.

laurigates commented 3 days ago

An error occurred while processing this issue: Error processing issue #2: 422 {"message": "Validation Failed", "errors": [{"resource": "PullRequest", "code": "custom", "message": "No commits between main and fix-issue-2"}], "documentation_url": "https://docs.github.com/rest/pulls/pulls#create-a-pull-request", "status": "422"}

laurigates commented 3 days ago

An error occurred while processing this issue: Error processing issue #2: 422 {"message": "Validation Failed", "errors": [{"resource": "PullRequest", "code": "custom", "message": "No commits between main and fix-issue-2-1"}], "documentation_url": "https://docs.github.com/rest/pulls/pulls#create-a-pull-request", "status": "422"}