feat: update auto-instrumentation to re-inject instrumentation path after init #18921
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This action requires that any PR targeting the main branch should add a | |
| # changelog fragment file in a .changelog/ directory. If a changelog entry | |
| # is not required, add the "Skip Changelog" label to disable this action. | |
| name: changelog | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| changelog: | |
| runs-on: ubuntu-latest | |
| if: | | |
| !contains(github.event.pull_request.labels.*.name, 'Skip Changelog') | |
| && github.actor != 'otelbot[bot]' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch base branch | |
| run: git fetch origin ${{ github.base_ref }} --depth=1 | |
| - name: Ensure no direct changes to CHANGELOG.md | |
| run: | | |
| if [[ $(git diff --name-only FETCH_HEAD -- 'CHANGELOG.md' '**/CHANGELOG.md') ]] | |
| then | |
| echo "CHANGELOG.md files should not be directly modified." | |
| echo "Please add a changelog fragment file to the appropriate .changelog/ directory instead." | |
| echo "See CONTRIBUTING.md for details." | |
| echo "" | |
| echo "Or add the \"Skip Changelog\" label if this job should be skipped." | |
| false | |
| fi | |
| - name: Check for changelog fragment | |
| run: | | |
| # Check for any new fragment files in any .changelog/ directory | |
| fragments=$(git diff --diff-filter=A --name-only FETCH_HEAD -- '**/.changelog/*' '.changelog/*' | grep -v '.gitignore' || true) | |
| if [[ -z "$fragments" ]]; then | |
| echo "No changelog fragment found for this PR." | |
| echo "" | |
| echo "Add a file named .changelog/${{ github.event.pull_request.number }}.<type>" | |
| echo "where <type> is one of: added, changed, deprecated, removed, fixed" | |
| echo "" | |
| echo "For coordinated packages, add to the root .changelog/ directory." | |
| echo "For independently released packages, add to <package>/.changelog/" | |
| echo "See CONTRIBUTING.md for details." | |
| echo "" | |
| echo "Or add the \"Skip Changelog\" label if this job should be skipped." | |
| exit 1 | |
| fi | |
| echo "Found changelog fragment(s):" | |
| echo "$fragments" | |
| - name: Install towncrier | |
| run: pip install towncrier==25.8.0 | |
| - name: Preview changelog | |
| run: towncrier build --draft --version Unreleased |