Update code before pulling diff (#567)
Signed-off-by: Glenn Jocher <[email protected]>
This commit is contained in:
+33
-33
@@ -118,19 +118,6 @@ runs:
|
||||
ref: ${{ github.head_ref || github.ref }}
|
||||
fetch-depth: 1
|
||||
|
||||
# PR Summary -------------------------------------------------------------------------------------------------------
|
||||
- name: PR Summary
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && inputs.summary == 'true' && github.event.action != 'synchronize' && github.event.action != 'review_requested'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
BRAVE_API_KEY: ${{ inputs.brave_api_key }}
|
||||
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
|
||||
OPENAI_MODEL: ${{ inputs.openai_model }}
|
||||
run: |
|
||||
ultralytics-actions-summarize-pr
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
# File header ------------------------------------------------------------------------------------------------------
|
||||
- name: File Header
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && (github.event.action == 'opened' || github.event.action == 'synchronize')
|
||||
@@ -232,6 +219,39 @@ runs:
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
# Commit Changes ---------------------------------------------------------------------------------------------------
|
||||
- name: Commit and Push Changes
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && (github.event.action == 'opened' || github.event.action == 'synchronize')
|
||||
env:
|
||||
GITHUB_USERNAME: ${{ inputs.github_username }}
|
||||
GITHUB_EMAIL: ${{ inputs.github_email }}
|
||||
run: |
|
||||
git config --global user.name "$GITHUB_USERNAME"
|
||||
git config --global user.email "$GITHUB_EMAIL"
|
||||
git add .
|
||||
git reset HEAD -- .github/workflows/ # workflow changes are not permitted with default token
|
||||
if ! git diff --staged --quiet; then
|
||||
git commit -m "Auto-format by https://ultralytics.com/actions"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
# PR Summary -------------------------------------------------------------------------------------------------------
|
||||
- name: PR Summary
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && inputs.summary == 'true' && github.event.action != 'synchronize' && github.event.action != 'review_requested'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ inputs.token }}
|
||||
BRAVE_API_KEY: ${{ inputs.brave_api_key }}
|
||||
OPENAI_API_KEY: ${{ inputs.openai_api_key }}
|
||||
OPENAI_MODEL: ${{ inputs.openai_model }}
|
||||
run: |
|
||||
ultralytics-actions-summarize-pr
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
# Autolabel Issues and PRs (labels and first interaction) ---------------------------------------------------------
|
||||
- name: Autolabel Issues and PRs
|
||||
if: inputs.labels == 'true' && (github.event.action == 'opened' || github.event.action == 'created')
|
||||
@@ -263,26 +283,6 @@ runs:
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
# Commit Changes ---------------------------------------------------------------------------------------------------
|
||||
- name: Commit and Push Changes
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && (github.event.action == 'opened' || github.event.action == 'synchronize')
|
||||
env:
|
||||
GITHUB_USERNAME: ${{ inputs.github_username }}
|
||||
GITHUB_EMAIL: ${{ inputs.github_email }}
|
||||
run: |
|
||||
git config --global user.name "$GITHUB_USERNAME"
|
||||
git config --global user.email "$GITHUB_EMAIL"
|
||||
git add .
|
||||
git reset HEAD -- .github/workflows/ # workflow changes are not permitted with default token
|
||||
if ! git diff --staged --quiet; then
|
||||
git commit -m "Auto-format by https://ultralytics.com/actions"
|
||||
git push
|
||||
else
|
||||
echo "No changes to commit"
|
||||
fi
|
||||
shell: bash
|
||||
continue-on-error: true
|
||||
|
||||
# Broken links -----------------------------------------------------------------------------------------------------
|
||||
- name: Broken Link Checker
|
||||
if: inputs.links == 'true' && github.event.action != 'closed'
|
||||
|
||||
Reference in New Issue
Block a user