-
Notifications
You must be signed in to change notification settings - Fork 2
fix: resolve issue #299 - bert-e: pr status should be displayed at all time #301
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
base: main
Are you sure you want to change the base?
Changes from all commits
38a739a
1f2562b
66e75e8
27ca8f7
2e5c42f
d19d9ef
246c2d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,14 @@ | |
|
|
||
| def handle_bitbucket_pr_event(bert_e, event, json_data): | ||
| """Handle a Bitbucket webhook sent on a pull request event.""" | ||
| commenter = (json_data.get('comment') or {}).get('user') or {} | ||
| if event.startswith('comment') and bert_e.settings.robot in ( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| commenter.get('nickname'), commenter.get('username'), | ||
| commenter.get('account_id')): | ||
| # Bert-E's own comments (including its status comment) must not | ||
| # trigger new runs | ||
| LOG.debug('Comment written by the robot, ignoring event') | ||
| return | ||
| pr_id = json_data['pullrequest']['id'] | ||
| pr = PullRequest(bert_e.client, **json_data['pullrequest']) | ||
| LOG.info('The pull request <%s> has been updated', pr_id) | ||
|
|
@@ -78,6 +86,12 @@ | |
|
|
||
| def handle_github_issue_comment(bert_e, json_data): | ||
| """Handle a GitHub webhook sent on an issue comment event.""" | ||
| sender = (json_data.get('comment') or {}).get('user') or {} | ||
| if sender.get('login') == bert_e.settings.robot: | ||
|
upsun-dispatch[bot] marked this conversation as resolved.
|
||
| # Bert-E's own comments (including its status comment) must not | ||
| # trigger new runs | ||
| LOG.debug('Comment written by the robot, ignoring event') | ||
| return | ||
| event = github.IssueCommentEvent(client=bert_e.client, **json_data) | ||
| pr = event.pull_request | ||
| if pr: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| {% extends "message.md" %} | ||
|
|
||
| {% block title -%} | ||
| Bert-E status | ||
| {% endblock %} | ||
|
|
||
| {% block message %} | ||
| {{ icon }} **{{ label }}**{% if code %} (message {{ code }}){% endif %} | ||
|
|
||
| {% if integration is not none %} | ||
| {% if integration %} | ||
| integration branch | pull request | build | ||
| -------------------|--------------|------ | ||
| {% for item in integration -%} | ||
| `{{ item.branch }}` | {% if item.pr_id %}#{{ item.pr_id }}{% else %}-{% endif %} | {% if item.build %}{{ item.build }}{% else %}-{% endif %} | ||
| {% endfor %} | ||
| {% else %} | ||
| *No integration branch.* | ||
| {% endif %} | ||
| {% endif %} | ||
|
|
||
| {% if status %} | ||
| {% include 'status_report.md' %} | ||
| {% endif %} | ||
|
|
||
| *This comment is kept up to date by Bert-E.* | ||
| {% endblock %} |
Uh oh!
There was an error while loading. Please reload this page.