-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a304e22
commit 415135d
Showing
1 changed file
with
9 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ jobs: | |
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
// 'core' is already provided by actions/github-script | ||
const issueBody = context.payload.issue.body; | ||
const issueTitle = context.payload.issue.title; | ||
const lines = issueBody.split('\n'); | ||
|
@@ -62,12 +61,7 @@ jobs: | |
echo "Prompt Content:" | ||
echo "${{ steps.extract_data.outputs.PROMPT_CONTENT_B64 }}" | base64 --decode | ||
- name: Create Branch | ||
id: branch_name | ||
run: | | ||
BRANCH_NAME="issue-${{ github.event.issue.number }}" | ||
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT | ||
git checkout -b "$BRANCH_NAME" | ||
# Remove 'Create Branch' and 'Push Branch' steps | ||
|
||
- name: Create File from Issue | ||
run: | | ||
|
@@ -94,25 +88,21 @@ jobs: | |
echo | ||
echo "$PROMPT_CONTENT" | ||
} > "$FILE_PATH" | ||
git add "$FILE_PATH" | ||
git commit -m "Add prompt '$PROMPT_NAME' from Issue #${{ github.event.issue.number }}" | ||
- name: Push Branch | ||
run: | | ||
BRANCH_NAME="${{ steps.branch_name.outputs.branch }}" | ||
git push origin "$BRANCH_NAME" | ||
# Do not commit changes here | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ steps.branch_name.outputs.branch }} | ||
base: main | ||
commit-message: "Add prompt '${{ steps.extract_data.outputs.PROMPT_NAME }}' from Issue #${{ github.event.issue.number }}" | ||
committer: 'GitHub <[email protected]>' | ||
author: 'Your Name <[email protected]>' # Replace with your details or use a generic name | ||
title: "Add Prompt: ${{ steps.extract_data.outputs.PROMPT_NAME }}" | ||
body: | | ||
Adds a new prompt from Issue #${{ github.event.issue.number }}. | ||
Automatically generated by GitHub Actions. | ||
committer: 'GitHub <[email protected]>' | ||
author: 'Your Name <[email protected]>' | ||
skip-commits: true | ||
branch: "issue-${{ github.event.issue.number }}" | ||
branch-suffix: "none" | ||
base: main | ||
delete-branch: false | ||
overwrite-existing: true |