Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

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

Description

@boginw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions