ci: Get PR number from env variable

This commit is contained in:
Shrikant Sharat Kandula 2024-05-20 20:47:15 +05:30
parent 2459607a3f
commit e9102d5085
2 changed files with 3 additions and 3 deletions

View File

@ -84,12 +84,12 @@ jobs:
echo "One or more files in the server folder has changed."
echo "List all the files that have changed: $ALL_CHANGED_FILES"
# get all the files changes in the cypress/e2e folder
- name: Get added files in cypress/e2e folder
- name: Check compliance
if: inputs.pr != 0 && steps.changed-files-specific.outputs.any_changed == 'true'
uses: actions/github-script@v7
env:
NODE_PATH: "${{ github.workspace }}/.github/workflows/scripts"
PR_NUMBER: ${{ inputs.pr }}
with:
script: |
await require("client-build-compliance.js")({core, github, context})

View File

@ -1,5 +1,5 @@
module.exports = async ({core, github, context}) => {
const prNumber = context.payload.inputs.pr;
const prNumber = process.env.PR_NUMBER;
const affectedFiles = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,