Skip to content

Do not create another auto PR when a job runs for PR or merge queue #1598

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

Merged
merged 1 commit into from
Apr 14, 2025
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
17 changes: 13 additions & 4 deletions .github/workflows/generate-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,24 @@ jobs:

echo "DIFF_IS_EMPTY=$([[ -z "$diff_excluding_submodule" ]] && echo 'true' || echo 'false')" >> $GITHUB_ENV
echo "CURRENT_DATETIME=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
## Run if diff exists and pull request, and make CI status failure (but allow renovate bot)
- if: ${{ github.event_name == 'pull_request' && env.DIFF_IS_EMPTY != 'true' && github.actor != 'renovate[bot]' }}
## Run if diff exists and pull request or merge queue, and make CI status failure (but allow renovate bot)
- if: >-
${{
(github.event_name == 'pull_request' || github.event_name == 'merge_group')
&& env.DIFF_IS_EMPTY != 'true'
&& github.actor != 'renovate[bot]'
}}
run: |
echo "There are changes in the generated codes. Please run 'generate-code.py' and commit the changes." >&2
echo "The files with differences are as follows." >&2
echo "$(git --no-pager diff --name-only HEAD)" >&2
exit 1
## Run if diff exists and event is not pull request, and make PR
- if: ${{ github.event_name != 'pull_request' && env.DIFF_IS_EMPTY != 'true' }}
## Run if diff exists and event is push or workflow_dispatch, make PR
- if: >-
${{
(github.event_name == 'push' || github.event_name == 'workflow_dispatch')
&& env.DIFF_IS_EMPTY != 'true'
}}
run: |
# Determine Change Type via Submodule Script. This scripts read current uncommited changes.
CHANGE_TYPE=$(npx zx ./line-openapi/tools/determine-change-type.mjs)
Expand Down