Changing PR author from CodeBuild

0

Summary: I'm using codebuild to run 'Renovate Bot' on my repository, The 'Renovate Bot' will create pull requests, but the Author of the Pull Request is Overridden by the ARN. (if i'm in EC2 its EC2 ARN, if i'm in codebuild it's Build ARN, if i run it without any amazon resource it's not overridden)

Wanted results: I expect to be able to set my own Author, so i can recognize who opened those Pull requests, every time i run my ci tool, i get the same author from the same bot. this helps recognize who created the PR, so next time when i run the 'Renovate Bot', the bot will be able to spot that it opened this PR.

The case: on the first run the bot creates a PR. on the second run the bot tries to add a comment to the PR.

What i get in this case is this: | "You cannot update this comment. The only person who can update a comment is the IAM user who created it."

so i want my codebuild to create PRs with the same user every run, how do i do that?

see for reference https://github.com/renovatebot/renovate/discussions/23769

asked 9 months ago186 views
1 Answer
0

Hi,

git commits have two identifying pieces of information(author, and committer). AWS CodeCommit used to (it may have changed recently.... I didn't retest) only display the 'committer' in the console and to confusingly label as 'author'). I would guess that your commits have differing author (the true one) and committer (the bot) values.

To validate these values with CodeCommit, you can call the 'get-commit' api directly from the AWS CLI (in region where your repo lives) aws codecommit get-commit --repository-name <repository-name> --commit-id <xyz> to see if you get both as you want.

Best,

Didier

profile pictureAWS
EXPERT
answered 9 months ago
  • sorry but that doesn't help my case,

    What the bot does is on the first run it creates a PR. on the second run it needs to add a comment on the PR.

    What i get in this case is this: | "You cannot update this comment. The only person who can update a comment is the IAM user who created it."

    so i want my codebuild to create PRs with the same user every run, how do i do that?

    see for reference https://github.com/renovatebot/renovate/discussions/23769

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions