0

I would like to access GitHub.CommitMessage during AWS CodeDeploy (as a part of AWS CodePipeline) phase in my EC2 Instance.

Additional details:

  • private repo inside organization

How can I do it?

enter image description here

0

1 Answer 1

0

Someone has already answered how to get the git commit Id . basically,

get deployment id

get the deployment id from DEPLOYMENT_ID environment variable

get commit id

make an api call to GetDeployment api end point with the deployment id to get the commit details

get commit message

now to get the commit message, github has a get commit api end point. This step requires a github access token

GET /repos/:owner/:repo/commits/:ref

reference: aws codedeploy git revision during deploy

Sign up to request clarification or add additional context in comments.

5 Comments

what about private repos inside organization? Is CodeDeploy authorized to do so?
access token is needed to fetch private repo details
have you found a way, i didn't a get a chance to look at it yet
Yes I did. I'm going to store github personal access tooken on EC2 and copy whole repository.
glad to be of help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.