Skip to content

Refactor connection methods and improve encapsulation #1790

Refactor connection methods and improve encapsulation

Refactor connection methods and improve encapsulation #1790

Workflow file for this run

on: pull_request
jobs:
release:
name: Validation
runs-on: ubuntu-latest
steps:
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v2
with:
fetch-depth: 1
- run: npm ci
- name: Build types
run: npm run typings
- run: npm install -g @vscode/vsce
- name: Create build
run: npm run package
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: code-for-ibmi-pr-build
path: ./*.vsix
- name: Find Comment
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: new build is available
- name: Post comment
if: steps.fc.outputs.comment-id == ''
uses: actions/github-script@v5
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'πŸ‘‹ A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.\n * [Download here.](https://github.com/codefori/vscode-ibmi/actions/runs/${{ github.run_id }})\n* [Read more about how to test](https://github.com/codefori/vscode-ibmi/blob/master/.github/pr_testing_template.md)'
})
- name: Update comment
if: steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
edit-mode: replace
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
πŸ‘‹ A new build is available for this PR based on ${{ github.event.pull_request.head.sha }}.
* [Download here.](https://github.com/codefori/vscode-ibmi/actions/runs/${{ github.run_id }})
* [Read more about how to test](https://github.com/codefori/vscode-ibmi/blob/master/.github/pr_testing_template.md)