Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches:
- main
merge_group:

permissions:
contents: read
Expand All @@ -17,6 +18,7 @@ jobs:
changelog:
runs-on: ubuntu-latest
if: |
github.event_name != 'merge_group' &&
!contains(github.event.pull_request.labels.*.name, 'Skip Changelog')
&& github.actor != 'otelbot[bot]'

Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ on:
- '**/*.rst'
- '.github/workflows/check-links.yml'
- '.github/workflows/check_links_config.json'
merge_group:
paths:
- '**/*.md'
- '**/*.rst'
- '.github/workflows/check-links.yml'
- '.github/workflows/check_links_config.json'

permissions:
contents: read
Expand All @@ -21,6 +27,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true

env:
DIFF_RANGE: ${{ github.event_name == 'merge_group' && format('{0}...{1}', github.event.merge_group.base_sha, github.event.merge_group.head_sha) || format('origin/{0}...HEAD', github.base_ref) }}

jobs:
check-links:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -53,14 +62,14 @@ jobs:
${{ steps.changed-files.outputs.all_changed_files }} \
|| { echo "Check that anchor links are lowercase"; exit 1; }

- name: Check new links only on pull requests
if: steps.changed-files.outputs.any_changed == 'true' && github.event_name == 'pull_request'
- name: Check new links
if: steps.changed-files.outputs.any_changed == 'true' && (github.event_name == 'pull_request' || github.event_name == 'merge_group')
run: |
# Extract URLs only from added lines in the diff to avoid
# rate limiting when checking all links in large files like
# CHANGELOG.md. Only new/changed links are checked on PRs;
# pushes to main still check all links in changed files.
git diff "origin/${{ github.base_ref }}...HEAD" -- \
git diff "$DIFF_RANGE" -- \
${{ steps.changed-files.outputs.all_changed_files }} \
| grep '^+' | grep -v '^+++' \
| grep -oP 'https?://[^\s\)\]\"'"'"'`>]+' \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- 'main'
pull_request:
merge_group:

permissions:
contents: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- 'main'
pull_request:
merge_group:

permissions:
contents: read
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
{%- endif %}
{%- if job_data == "docs" %}
if: |
github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
github.event_name == 'merge_group' ||
(github.event_name == 'pull_request' &&
github.event.pull_request.user.login != 'otelbot[bot]')
{%- endif %}
steps:
- name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
if: |
github.event.pull_request.user.login != 'otelbot[bot]' && github.event_name == 'pull_request'
github.event_name == 'merge_group' ||
(github.event_name == 'pull_request' &&
github.event.pull_request.user.login != 'otelbot[bot]')
steps:
- name: Checkout repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
Expand Down
Loading