Skip to content

Commit 33f2f20

Browse files
authored
Merge pull request #3 from akarsh/javascript
Update token
2 parents af16103 + 0b5295d commit 33f2f20

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/create-pr-on-push-to-develop.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
create-pr:
1212
runs-on: ubuntu-latest
1313
env:
14-
GH_TOKEN: ${{ secrets.PAT_JEST_TYPESCRIPT_EXAMPLE }}
14+
GH_TOKEN: ${{ secrets.PAT_EXAMPLE }}
1515
steps:
1616
- name: Checkout code
1717
uses: actions/checkout@v4
@@ -25,12 +25,12 @@ jobs:
2525
run: |
2626
COMMIT_SHA=$(git rev-parse HEAD)
2727
COMMIT_TITLE=$(git log -1 --pretty=format:'%s' $COMMIT_SHA)
28-
COMMIT_MESSAGE=$(git log -1 --pretty=format:'%b' $COMMIT_SHA)
28+
COMMIT_MESSAGE=$(git log -1 --pretty=format:'%B' $COMMIT_SHA)
2929
COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an' $COMMIT_SHA)
3030
echo "commit_sha=${COMMIT_SHA}" >> $GITHUB_ENV
3131
echo "commit_title=${COMMIT_TITLE}" >> $GITHUB_ENV
32-
echo "commit_message=${COMMIT_MESSAGE}" >> $GITHUB_ENV
3332
echo "commit_author=${COMMIT_AUTHOR}" >> $GITHUB_ENV
33+
echo "${COMMIT_MESSAGE}" > commit_message.txt
3434
3535
- name: Map commit author to GitHub username
3636
id: map_author
@@ -53,7 +53,7 @@ jobs:
5353
LABEL_KEYWORDS["wontfix"]="wontfix"
5454
5555
COMMIT_TITLE="${{ env.commit_title }}"
56-
COMMIT_MESSAGE="${{ env.commit_message }}"
56+
COMMIT_MESSAGE=$(cat commit_message.txt) # Read commit message from the file
5757
5858
LABELS=""
5959
@@ -70,4 +70,5 @@ jobs:
7070
- name: Create pull request
7171
id: create_pr
7272
run: |
73-
gh pr create --head ${{ env.BRANCH_NAME }} --base main -t "$commit_title" -b "$commit_message" -a "$GITHUB_USERNAME" -l "$LABELS"
73+
COMMIT_MESSAGE=$(cat commit_message.txt) # Read commit message from the file
74+
gh pr create --head ${{ env.BRANCH_NAME }} --base main -t "${{ env.commit_title }}" -b "$COMMIT_MESSAGE" -a "${{ env.GITHUB_USERNAME }}" -l "${{ env.LABELS }}"

0 commit comments

Comments
 (0)