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

Actiontest into parent repo #15

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
e6ccea5
Create generate-pr-description.yml
mkarle Sep 5, 2023
c0aea80
update readme for test
mkarle Sep 5, 2023
f59d9fe
Update generate-pr-description.yml
mkarle Sep 5, 2023
7c83806
Update generate-pr-description.yml
mkarle Sep 5, 2023
508c79f
test
mkarle Sep 5, 2023
91e2948
Merge branch 'actiontest' of https://github.com/mkarle/skonsole into …
mkarle Sep 5, 2023
45b5465
update gh action
mkarle Sep 5, 2023
72f824d
Merge branch 'main' into actiontest
mkarle Sep 5, 2023
51a085f
update gh action
mkarle Sep 5, 2023
e71107c
Merge branch 'actiontest' of https://github.com/mkarle/skonsole into …
mkarle Sep 5, 2023
5b3ccc3
update action
mkarle Sep 5, 2023
1260e21
update .net version
mkarle Sep 6, 2023
ad888b2
updating env vars
mkarle Sep 6, 2023
91e552a
update pr description from output
mkarle Sep 6, 2023
1ec58c2
update pr description from output
mkarle Sep 6, 2023
c3e0a61
try on windows
mkarle Sep 7, 2023
5c7bdd2
wrong targetBranch arg
mkarle Sep 7, 2023
7a560f6
why git not work.ing?
mkarle Sep 7, 2023
adffaf7
try fetch depth=0
mkarle Sep 7, 2023
3209a21
maybe checkout v4?
mkarle Sep 7, 2023
e9b6ef0
checkout pr head
mkarle Sep 7, 2023
73a0083
verify repo
mkarle Sep 7, 2023
76cec66
Update generate-pr-description.yml
mkarle Sep 7, 2023
3d8ab06
verify repo
mkarle Sep 7, 2023
7b0a787
verify repo
mkarle Sep 7, 2023
f514318
verify repo
mkarle Sep 7, 2023
2e01eda
verify repo
mkarle Sep 7, 2023
002e737
verify repo
mkarle Sep 7, 2023
3e5d523
verify repo
mkarle Sep 7, 2023
90a3ffb
verify repo
mkarle Sep 7, 2023
4591282
verify repo
mkarle Sep 7, 2023
f211396
verify repo
mkarle Sep 7, 2023
f78d07b
wrap output in string
mkarle Sep 7, 2023
8b6839d
multiline output
mkarle Sep 7, 2023
1a5c1fa
fix command
mkarle Sep 7, 2023
d44280c
fix command
mkarle Sep 7, 2023
4a8f7cd
test command
mkarle Sep 7, 2023
acd221a
test command
mkarle Sep 7, 2023
d9b71e0
test command
mkarle Sep 7, 2023
90517d5
test command
mkarle Sep 7, 2023
5717157
test command
mkarle Sep 7, 2023
127a1cb
Testing output json
mkarle Sep 11, 2023
3166665
fix typo
mkarle Sep 11, 2023
72abc4a
check checkout directory
mkarle Sep 11, 2023
083e412
run SKonsole using dotnet run
mkarle Sep 11, 2023
ddd2c82
checkout outputjson
mkarle Sep 11, 2023
6a61902
checkout actiontest
mkarle Sep 11, 2023
0269752
trying another update tool
mkarle Sep 11, 2023
ff77eb6
sourceshould be head
mkarle Sep 11, 2023
07f880c
remove pr description block
mkarle Sep 11, 2023
693faa2
trigger from comment
mkarle Sep 11, 2023
4fe0211
trigger from comment
mkarle Sep 11, 2023
7afcadb
Change to comment trigger and update skonsole command
mkarle Sep 12, 2023
17273a1
improve comment trigger
mkarle Sep 12, 2023
f46bd88
Adding comment trigger to run skonsole
mkarle Sep 12, 2023
0b99832
Merge branch 'main' into actiontest
mkarle Sep 12, 2023
ef29c36
Use skonsole 1.0.2 instead of local checkout
mkarle Sep 13, 2023
217c700
Use a published github action for generating pr description
mkarle Sep 13, 2023
f868971
Add token as an input
mkarle Sep 13, 2023
e2a3046
Add update type to pr updater.
mkarle Sep 13, 2023
1a33a08
Fix update type conditional
mkarle Sep 13, 2023
45f5c59
Use skonsole 1.0.2 instead of local checkout
mkarle Sep 13, 2023
157da2e
Use a published github action for generating pr description
mkarle Sep 13, 2023
fea009c
Add token as an input
mkarle Sep 13, 2023
7a3caba
Add update type to pr updater.
mkarle Sep 13, 2023
5311eb9
Fix update type conditional
mkarle Sep 13, 2023
0a7cd64
Test PR to parent repo
mkarle Sep 14, 2023
efa8344
Update generate-pr-description.yml
mkarle Sep 14, 2023
8bfb20d
Merge branch 'lemillermicrosoft:main' into main
mkarle Sep 14, 2023
b5d4524
Merge branch 'lemillermicrosoft:main' into actiontest-into-parent-repo
mkarle Sep 14, 2023
5ce720a
Merge branch 'main' of https://github.com/mkarle/skonsole into action…
mkarle Sep 14, 2023
ca867d9
Merge branch 'actiontest-into-parent-repo' of https://github.com/mkar…
mkarle Sep 14, 2023
a47c9ec
Update generate-pr-description.yml
mkarle Sep 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/generate-pr-description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Generate PR Description

on: pull_request

jobs:
generate-pr-description:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && contains(github.event.comment.body, '/generate_pr_description')
steps:
- name: Get PR branch
uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch

- name: Set latest commit status as pending
uses: myrotvorets/set-commit-status-action@master
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: pending

- name: Generate PR description
uses: mkarle/skonsole-generate-pr-description@v1
with:
target-branch: ${{ steps.comment-branch.outputs.base_sha }}
source-branch: ${{ steps.comment-branch.outputs.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
update-type: ${{ contains(github.event.comment.body, 'replace') && 'replace' || (contains(github.event.comment.body, 'prefix') && 'prefix' || 'suffix') }}
env: # Set Azure credentials secret as an input
AZURE_OPENAI_CHAT_DEPLOYMENT_NAME: ${{ vars.AZURE_OPENAI_CHAT_DEPLOYMENT_NAME }}
AZURE_OPENAI_API_ENDPOINT: ${{ secrets.AZURE_OPENAI_API_ENDPOINT }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}

- name: Set latest commit status as ${{ job.status }}
uses: myrotvorets/set-commit-status-action@master
if: always()
with:
sha: ${{ steps.comment-branch.outputs.head_sha }}
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}

- name: Add comment to PR
uses: actions/github-script@v6
if: always()
with:
script: |
const name = '${{ github.workflow }}';
const url = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}';
const success = '${{ job.status }}' === 'success';
const body = `${name}: ${success ? 'succeeded ✅' : 'failed ❌'}\n${url}`;

await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@

This is a test PR. Please ignore!

# SKonsole - A Console App built on Semantic Skills

This repository contains a demo of a console application called SKonsole, which uses the Semantic Kernel to run various skills. The app currently supports two skills: generating commit messages and generating pull request feedback. The app uses environment variables to configure the Azure OpenAI backend.

## Getting Started

To get started, simply run the following commands in the terminal:

```Copy code
apps\SKonsole> dotnet build
apps\SKonsole> dotnet run
```

This should build and run the SKonsole app. Note that you may need to configure your environment variables with your Azure OpenAI credentials before running the app.

## Projects and Classes

This repository contains several projects and classes, including:

- PRSkill: A skill that can generate feedback, commit messages, and pull request descriptions based on git diff or git show output. The PRSkill uses the CondenseSkill as a dependency and implements chunking and aggregation mechanisms to handle large inputs.
Expand All @@ -23,6 +29,7 @@ This repository contains several projects and classes, including:
## Installing SKonsole Tool

Install the SKonsole Tool globally with a few quick steps:

### Installation

1. Open your terminal or command prompt.
Expand All @@ -31,7 +38,9 @@ Install the SKonsole Tool globally with a few quick steps:
```shell
dotnet tool install --global SKonsole
```

3. To confirm the installation was successful, run:

```shell
skonsole --version
```
Expand All @@ -49,14 +58,19 @@ Install the SKonsole Tool globally with a few quick steps:
- `skonsole promptChat`: Engage in interactive prompt chat sessions.

## Dependencies

This project requires the following dependencies:

- [Semantic Kernel](https://github.com/microsoft/semantic-kernel)

## Github Action

Use this as a github action too. TODO

## Future Work

In the future, the SKonsole app could be expanded to support more skills and to parse arguments on launch. Additionally, the repository could include instructions for setting up NuGet credentials and using a GitHub Package source.

I hope this README is helpful for you and others who may use your repository in the future. Let me know if there's anything else I can do to help!


####_This README was generated using Semantic Kernel_
#### _This README was generated using Semantic Kernel_
Binary file added output.txt
Binary file not shown.