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

AWS' new Github integration does not work with this project #14

Open
boginw opened this issue Mar 23, 2022 · 0 comments · May be fixed by #15
Open

AWS' new Github integration does not work with this project #14

boginw opened this issue Mar 23, 2022 · 0 comments · May be fixed by #15

Comments

@boginw
Copy link

boginw commented Mar 23, 2022

With the new Github (Version 2) integration, the function is unable to retrieve the relevant information from the revision URL.

Current executions lead to CloudWatch reporting the following:

"errorType": "TypeError",
"errorMessage": "Cannot read property '1' of null",
"stack": [
    "TypeError: Cannot read property '1' of null",
    "    at Object.exports.getPipelineExecution (/var/task/index.js:82:19)",
    "    at processTicksAndRejections (internal/process/task_queues.js:97:5)",
    "    at async Runtime.exports.handler (/var/task/index.js:22:18)"
]

I tried logging the revision URL from the function, which yielded the following URL:

https://[REGION].console.aws.amazon.com/codesuite/settings/connections/redirect?connectionArn=arn:aws:codestar-connections:eu-west-1:[ACCOUNT-ID]:connection/[UUID]&referenceType=COMMIT&FullRepositoryId=[OWNER]/[REPOSITORY&Commit=[SHA]

It should be possible to detect whether or not the pipeline is using the old or the new Github integration and take the appropriate actions in order to extract the repo, owner, and sha.

boginw added a commit to boginw/github-commit-status-bot that referenced this issue Mar 23, 2022
@boginw boginw linked a pull request Mar 23, 2022 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant