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

ci: Update existing bot comment #1286

Merged
merged 6 commits into from
Oct 29, 2020

Conversation

pawelpasterz
Copy link
Contributor

@pawelpasterz pawelpasterz commented Oct 29, 2020

Test Plan

How do we know the code works?

github-actions[bot] comments are updated instead of creating a new one.
Used GMT+0 timezone for the timestamp

@github-actions
Copy link
Contributor

github-actions bot commented Oct 29, 2020

Timestamp: 2020-10-29 11:56:33
Buildscan url for ubuntu-workflow run 335744527
https://gradle.com/s/e54vf6qj5h5ka

@pawelpasterz pawelpasterz force-pushed the update-bot-comment-instead-of-create-new branch from c22ad3c to 629f0be Compare October 29, 2020 06:58
@pawelpasterz pawelpasterz force-pushed the update-bot-comment-instead-of-create-new branch from 629f0be to 8e6b7b3 Compare October 29, 2020 06:58
@pawelpasterz pawelpasterz force-pushed the update-bot-comment-instead-of-create-new branch from ff0a718 to 50c54c6 Compare October 29, 2020 07:06
@pawelpasterz pawelpasterz marked this pull request as ready for review October 29, 2020 07:09
@pawelpasterz pawelpasterz self-assigned this Oct 29, 2020
uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
Copy link
Contributor

@piotradamczyk5 piotradamczyk5 Oct 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably for push events, it will be null, but I am not sure if we should take care of it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe skip past push events and only check for a creation of pull request? @pawelpasterz

- name: Add ubuntu-workflow Build Scan URL to Pull Request
uses: mshick/add-pr-comment@v1
- name: Get current time
uses: 1466587594/get-current-time@v2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what a strange usename

uses: peter-evans/find-comment@v1
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe skip past push events and only check for a creation of pull request? @pawelpasterz

@pawelpasterz
Copy link
Contributor Author

@Sloox @piotradamczyk5
Good catches, I changed logic a bit. Now workflow skips publishing url when event is different that 'pull_request'

@piotradamczyk5 piotradamczyk5 merged commit 7cb4b3b into master Oct 29, 2020
@piotradamczyk5 piotradamczyk5 deleted the update-bot-comment-instead-of-create-new branch October 29, 2020 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants