Pull request: filtering: restore rewrite behavior with other question types

Updates #4008.

Squashed commit of the following:

commit babbc29331cfc2603c0c3b0987f5ba926690ec3e
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Dec 24 18:46:20 2021 +0300

    filtering: restore rewrite behavior with other question types
This commit is contained in:
Ainar Garipov
2021-12-24 20:14:36 +03:00
parent 46cd974e2a
commit 52f36f201e
7 changed files with 227 additions and 190 deletions

View File

@@ -103,32 +103,30 @@
- 'name': 'Run snapshot build'
'run': 'make SIGN=0 VERBOSE=1 build-release build-docker'
# TODO(a.garipov): Remove once AWS/Slack are back online.
#
# 'notify':
# 'needs':
# - 'build-release'
# # Secrets are not passed to workflows that are triggered by a pull request
# # from a fork.
# #
# # Use always() to signal to the runner that this job must run even if the
# # previous ones failed.
# 'if':
# ${{ always() &&
# (
# github.event_name == 'push' ||
# github.event.pull_request.head.repo.full_name == github.repository
# )
# }}
# 'runs-on': 'ubuntu-latest'
# 'steps':
# - 'name': 'Conclusion'
# 'uses': 'technote-space/workflow-conclusion-action@v1'
# - 'name': 'Send Slack notif'
# 'uses': '8398a7/action-slack@v3'
# 'with':
# 'status': '${{ env.WORKFLOW_CONCLUSION }}'
# 'fields': 'repo, message, commit, author, workflow'
# 'env':
# 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
# 'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'
'notify':
'needs':
- 'build-release'
# Secrets are not passed to workflows that are triggered by a pull request
# from a fork.
#
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}}
'runs-on': 'ubuntu-latest'
'steps':
- 'name': 'Conclusion'
'uses': 'technote-space/workflow-conclusion-action@v1'
- 'name': 'Send Slack notif'
'uses': '8398a7/action-slack@v3'
'with':
'status': '${{ env.WORKFLOW_CONCLUSION }}'
'fields': 'repo, message, commit, author, workflow'
'env':
'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'

View File

@@ -33,33 +33,31 @@
- 'name': 'Run ESLint'
'run': 'npm --prefix="./client" run lint'
# TODO(a.garipov): Remove once AWS/Slack are back online.
#
# 'notify':
# 'needs':
# - 'go-lint'
# - 'eslint'
# # Secrets are not passed to workflows that are triggered by a pull request
# # from a fork.
# #
# # Use always() to signal to the runner that this job must run even if the
# # previous ones failed.
# 'if':
# ${{ always() &&
# (
# github.event_name == 'push' ||
# github.event.pull_request.head.repo.full_name == github.repository
# )
# }}
# 'runs-on': 'ubuntu-latest'
# 'steps':
# - 'name': 'Conclusion'
# 'uses': 'technote-space/workflow-conclusion-action@v1'
# - 'name': 'Send Slack notif'
# 'uses': '8398a7/action-slack@v3'
# 'with':
# 'status': '${{ env.WORKFLOW_CONCLUSION }}'
# 'fields': 'repo, message, commit, author, workflow'
# 'env':
# 'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
# 'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'
'notify':
'needs':
- 'go-lint'
- 'eslint'
# Secrets are not passed to workflows that are triggered by a pull request
# from a fork.
#
# Use always() to signal to the runner that this job must run even if the
# previous ones failed.
'if':
${{ always() &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
)
}}
'runs-on': 'ubuntu-latest'
'steps':
- 'name': 'Conclusion'
'uses': 'technote-space/workflow-conclusion-action@v1'
- 'name': 'Send Slack notif'
'uses': '8398a7/action-slack@v3'
'with':
'status': '${{ env.WORKFLOW_CONCLUSION }}'
'fields': 'repo, message, commit, author, workflow'
'env':
'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'