diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..99973175 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +# Keep the npm dependency tree and the GitHub Actions pinned versions +# up to date and covered by security alerts. +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + groups: + abaplint: + patterns: + - "@abaplint/*" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/ABAP_702.yaml b/.github/workflows/ABAP_702.yaml index 197ac94c..f5068745 100644 --- a/.github/workflows/ABAP_702.yaml +++ b/.github/workflows/ABAP_702.yaml @@ -6,18 +6,20 @@ on: permissions: contents: read +concurrency: + group: ABAP_702-${{ github.ref }} + cancel-in-progress: true + jobs: ABAP_702: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v5 - with: - ref: 702 - - uses: actions/setup-node@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v6 with: - node-version: 20 + node-version: '22' + cache: 'npm' - run: npm ci - - run: rm -rf src/00 - run: npm run downport - run: npx abaplint .github/abaplint/abap_702.jsonc diff --git a/.github/workflows/ABAP_CLOUD.yaml b/.github/workflows/ABAP_CLOUD.yaml index 107089a8..55b08b8f 100644 --- a/.github/workflows/ABAP_CLOUD.yaml +++ b/.github/workflows/ABAP_CLOUD.yaml @@ -6,15 +6,20 @@ on: permissions: contents: read +concurrency: + group: ABAP_CLOUD-${{ github.ref }} + cancel-in-progress: true + jobs: ABAP_CLOUD: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v6 with: - node-version: 20 + node-version: '22' + cache: 'npm' - run: npm ci - run: rm -r src/00 - run: npx abaplint .github/abaplint/abap_cloud.jsonc diff --git a/.github/workflows/ABAP_STANDARD.yaml b/.github/workflows/ABAP_STANDARD.yaml index a793ffcd..e4dff236 100644 --- a/.github/workflows/ABAP_STANDARD.yaml +++ b/.github/workflows/ABAP_STANDARD.yaml @@ -6,14 +6,19 @@ on: permissions: contents: read +concurrency: + group: ABAP_STANDARD-${{ github.ref }} + cancel-in-progress: true + jobs: ABAP_STANDARD: runs-on: ubuntu-latest timeout-minutes: 10 steps: - - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v6 with: - node-version: 20 + node-version: '22' + cache: 'npm' - run: npm ci - run: npx abaplint ./abaplint.jsonc diff --git a/.github/workflows/auto_branch.yaml b/.github/workflows/auto_branch.yaml new file mode 100644 index 00000000..863c416e --- /dev/null +++ b/.github/workflows/auto_branch.yaml @@ -0,0 +1,63 @@ +name: auto_branch + +# Shared implementation for auto_cloud/auto_downport: transforms the +# standard branch content, validates it with abaplint and force-pushes +# the result to the given output branch. The thin auto_ callers +# provide the trigger and the parameters. + +on: + workflow_call: + inputs: + branch: + description: "Output branch: cloud | 702" + required: true + type: string + do_downport: + description: "Downport before pushing (702); otherwise only src/00 is removed (cloud)" + required: false + type: boolean + default: false + lint_config: + description: "abaplint config used to validate the content before the push" + required: true + type: string + +permissions: + contents: write + +jobs: + auto_branch: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout Repository + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Set up Node.js + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 + with: + node-version: '22' + cache: 'npm' + + - run: npm ci + + - name: Remove restricted samples + if: ${{ !inputs.do_downport }} + run: rm -rf src/00 + + - name: Downport + if: inputs.do_downport + run: npm run downport + + - name: Lint ${{ inputs.branch }} content + run: npx abaplint ${{ inputs.lint_config }} + + - name: Commit and push to ${{ inputs.branch }} + env: + BRANCH: ${{ inputs.branch }} + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add -A + git commit -m "generate ${BRANCH} from ${GITHUB_SHA}" + git push --force origin "HEAD:${BRANCH}" diff --git a/.github/workflows/auto_cloud.yaml b/.github/workflows/auto_cloud.yaml index bcd5687e..a3f4e1bd 100644 --- a/.github/workflows/auto_cloud.yaml +++ b/.github/workflows/auto_cloud.yaml @@ -1,38 +1,22 @@ name: auto_cloud +# Rebuilds the cloud branch via auto_branch.yaml: removes the restricted +# samples (src/00), lints with the cloud config and force-pushes. + on: push: branches: [standard] -jobs: - auto_cloud: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout Repository - uses: actions/checkout@v5 - - - name: Set up Node.js - uses: actions/setup-node@v5 - with: - node-version: '16' +permissions: + contents: write - - run: npm ci - - run: rm -rf src/00 +concurrency: + group: auto_cloud + cancel-in-progress: false - - name: Commit Changes - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git add src - git commit -m "Cloud changes" - - - name: Switch to Branch cloud - run: git checkout -b cloud - - - name: Push Changes - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: cloud - force: true +jobs: + auto_cloud: + uses: ./.github/workflows/auto_branch.yaml + with: + branch: cloud + lint_config: .github/abaplint/abap_cloud.jsonc diff --git a/.github/workflows/auto_downport.yaml b/.github/workflows/auto_downport.yaml index c20d4917..c4f0a9bd 100644 --- a/.github/workflows/auto_downport.yaml +++ b/.github/workflows/auto_downport.yaml @@ -1,39 +1,23 @@ name: auto_downport +# Rebuilds the 702 branch via auto_branch.yaml: downports the sources, +# lints with the 702 config and force-pushes. + on: push: branches: [standard] -jobs: - auto_downport: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout Repository - uses: actions/checkout@v5 - - - name: Set up Node.js - uses: actions/setup-node@v5 - with: - node-version: '16' +permissions: + contents: write - - run: npm ci - - run: rm -rf src/00 - - run: npm run downport +concurrency: + group: auto_downport + cancel-in-progress: false - - name: Commit Changes - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git add . - git commit -m "Downport changes" - - - name: Switch to Branch 702 - run: git checkout -b 702 - - - name: Push Changes - uses: ad-m/github-push-action@v0.6.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: 702 - force: true +jobs: + auto_downport: + uses: ./.github/workflows/auto_branch.yaml + with: + branch: '702' + do_downport: true + lint_config: .github/abaplint/abap_702.jsonc diff --git a/.github/workflows/check_downport.yaml b/.github/workflows/check_downport.yaml deleted file mode 100644 index fef83b18..00000000 --- a/.github/workflows/check_downport.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: check_downport - -on: - pull_request: - -jobs: - auto_downport: - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - name: Checkout Repository - uses: actions/checkout@v5 - - - name: Set up Node.js - uses: actions/setup-node@v5 - with: - node-version: '16' - - - run: npm ci - - run: rm -rf src/00 - - run: npm run downport diff --git a/.github/workflows/generate_overview_apps.yaml b/.github/workflows/generate_overview_apps.yaml index 9f6fb5a6..f3d3eaef 100644 --- a/.github/workflows/generate_overview_apps.yaml +++ b/.github/workflows/generate_overview_apps.yaml @@ -14,12 +14,13 @@ jobs: timeout-minutes: 10 steps: - name: Checkout Repository - uses: actions/checkout@v5 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Set up Node.js - uses: actions/setup-node@v5 + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: - node-version: 20 + node-version: '22' + cache: 'npm' - run: npm ci - run: npm run launchpad diff --git a/src/01/03/z2ui5_cl_demo_app_154.clas.abap b/src/01/03/z2ui5_cl_demo_app_154.clas.abap index 076c2a9b..0c438b5a 100644 --- a/src/01/03/z2ui5_cl_demo_app_154.clas.abap +++ b/src/01/03/z2ui5_cl_demo_app_154.clas.abap @@ -57,7 +57,7 @@ CLASS z2ui5_cl_demo_app_154 IMPLEMENTATION. ( msgid = `MSG1` msgno = `001` msgty = `S` time_stmp = z2ui5_cl_util=>time_get_timestampl( ) msgnumber = `01` ) ( msgid = `MSG2` msgno = `002` msgty = `S` time_stmp = z2ui5_cl_util=>time_get_timestampl( ) msgnumber = `02` ) ). - client->nav_app_call( z2ui5_cl_pop_bal=>factory( lt_bal ) ). + client->nav_app_call( z2ui5_cl_pop_messages=>factory( lt_bal ) ). WHEN `POPUP_EXCEPTION`. TRY.