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

get rid of pull_request event fields #293

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions .github/workflows/docs-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Get branch name
id: get_branch
run: echo "branch_name=sync/${{ github.event.ref }}" >> $GITHUB_ENV
run: echo "branch_name=sync/${{ github.event.ref }}_${{github.event.head_commit.timestamp}}" >> $GITHUB_ENV

- name: Commit changes
env:
Expand All @@ -38,16 +38,16 @@ jobs:
git config user.name "${{ github.triggering_actor }}"
git config user.email "[email protected]"
# Get the commit message from the merged PR
commit_message="${{ github.event.pull_request.title }}"
commit_message="${{ github.event.head_commit.message }}"
git add -A .
git status
git commit -m "Copy files from ${{ github.event.pull_request.head.repo.full_name }} branch $branch_name: $commit_message"
git commit -m "Copy files from ${{ github.event.repository.full_name }} branch $branch_name: $commit_message"
# Create PR
git ls-remote --get-url origin
git push -u origin ${{ env.branch_name }}
gh pr create \
--body "This PR copies /docs files from ${{ github.event.pull_request.head.repo.full_name }}." \
--title "${{ github.event.pull_request.title }}" \
--body "This PR copies /docs files from ${{ github.event.repository.full_name }}." \
--title "${{ github.event.head_commit.message }}" \
--head "${{ env.branch_name }}" \
--base "main"
echo "Docs successfully pushed to knowledgebase-docs"
Expand Down
Loading