blob: 2881f04cc7448612cfc9b059c5685771d3da87e2 [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# CloudStack moved from the 4.x.y.z version scheme to X.y.z (e.g. 24.0.0) on
# main. Out of habit, contributors sometimes may still tag newly added
# @APICommand/@Parameter/@Param annotations with since = "4.NN" instead of
# the current major version. This check only runs against branches whose
# pom.xml is already on the new (>= 24) scheme, and only looks at annotations
# newly added by the PR.
name: Check API since annotation version
on:
pull_request:
paths:
- '**/*.java'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check-since-annotation:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
persist-credentials: false
- name: Check newly added since annotations
run: |
python3 .github/scripts/check_since_annotations.py \
--base "${{ github.event.pull_request.base.sha }}" \
--head "${{ github.event.pull_request.head.sha }}"