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

已提問 9 個月前檢視次數 197 次
1 個回答
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
專家
已回答 9 個月前
  • 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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南