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

[MISC] Use the NO CHANGELOG label to optimize the changelog detection logic in CI. #2037

Open
jieguangzhou opened this issue May 7, 2024 · 1 comment

Comments

@jieguangzhou
Copy link
Collaborator

jieguangzhou commented May 7, 2024

Currently, we have implemented changelog checks for all PRs, but this can be inconvenient for PRs involving minor changes that don't require a changelog update. Therefore, we could introduce a GitHub label to indicate whether a PR can skip the changelog CI checks.

jobs:
  # ---------------------------------
  # Unit Testing
  # ---------------------------------
  unit-testing:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ "ubuntu-latest" ]
        python-version: ["3.10", "3.11"]
    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    - name: Get PR Labels
      id: labels
      uses: actions/github-script@v6
      with:
        github-token: ${{secrets.GITHUB_TOKEN}}
        script: |
          const { data: pullRequest } = await github.rest.pulls.get({
            owner: context.repo.owner,
            repo: context.repo.repo,
            pull_number: context.issue.number
          });
          return pullRequest.labels.map(label => label.name);

    - name: Validate Changelog Update
      if: "!contains(steps.labels.outputs.result, 'no changelog')"
      uses: tarides/changelog-check-action@v2
      with:
        changelog: CHANGELOG.md
@jieguangzhou jieguangzhou changed the title Use the NO CHANGELOG label to optimize the changelog detection logic in CI. [MISC] Use the NO CHANGELOG label to optimize the changelog detection logic in CI. May 7, 2024
@jieguangzhou
Copy link
Collaborator Author

#2034 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant