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

Getting [error]Unexpected token 'C', "Cannot rea"... is not valid JSON while creating Change request through Github #38

Open
Shubhij12 opened this issue Sep 3, 2024 · 0 comments

Comments

@Shubhij12
Copy link

We are trying to create Change request through Github and getting below error:

[error]Unexpected token 'C', "Cannot rea"... is not valid JSON

We are using basic authentication to configure the same.

Please find below Yaml Configuration:

id: create
with:
devops-integration-user-name: ${{ secrets.SN_DEVOPS_USER }}
devops-integration-user-password: ${{ secrets.SN_DEVOPS_PASSWORD }}
instance-url: ${{ secrets.SN_INSTANCE_URL }}
tool-id: ${{ secrets.SN_ORCHESTRATION_TOOL_ID }}
context-github: ${{ toJSON(github) }}
job-name: 'ServiceNow Change Approval'
change-request: '{"setCloseCode":"true","attributes":{"short_description":"Automated Software Deployment","description":"Automated Software Deployment.","assignment_group":"ADC Bot Factory- Bot support","implementation_plan":"Software update is tested and results can be found in Test Summaries Tab; When the change is approved the implementation happens automated by the CICD pipeline within the change planned start and end time window.","backout_plan":"When software fails in production, the previous software release will be re-deployed.","test_plan":"Testing if the software was successfully deployed"}}'
interval: '100'
timeout: '3600'
changeCreationTimeOut: '3600'
abortOnChangeCreationFailure: true
abortOnChangeStepTimeout: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Output of Change Creation
run: echo "change-request-number = ${{ steps.create.outputs.change-request-number }} and change-request-sys-id = ${{ steps.create.outputs.change-request-sys-id }} " >> $GITHUB_OUTPUT

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