forked from matrix-org/matrix-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement changes to MSC2285 (private read receipts) ([\matrix-org#2221](matrix-org#2221)). * Add support for HTML renderings of room topics ([\matrix-org#2272](matrix-org#2272)). * Add stopClient parameter to MatrixClient::logout ([\matrix-org#2367](matrix-org#2367)). * registration: add function to re-request email token ([\matrix-org#2357](matrix-org#2357)). * Remove hacky custom status feature ([\matrix-org#2350](matrix-org#2350)). * Remove default push rule override for MSC1930 ([\matrix-org#2376](matrix-org#2376)). Fixes element-hq/element-web#15439. * Tweak thread creation & event adding to fix bugs around relations ([\matrix-org#2369](matrix-org#2369)). Fixes element-hq/element-web#22162 and element-hq/element-web#22180. * Prune both clear & wire content on redaction ([\matrix-org#2346](matrix-org#2346)). Fixes element-hq/element-web#21929. * MSC3786: Add a default push rule to ignore `m.room.server_acl` events ([\matrix-org#2333](matrix-org#2333)). Fixes element-hq/element-web#20788.
- Loading branch information
Showing
70 changed files
with
1,811 additions
and
817 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Find details about the PR associated with this ref | ||
# Outputs: | ||
# prnumber: the ID number of the associated PR | ||
# headref: the name of the head branch of the PR | ||
# baseref: the name of the base branch of the PR | ||
name: PR Details | ||
on: | ||
workflow_call: | ||
inputs: | ||
owner: | ||
type: string | ||
required: true | ||
description: The github username of the owner of the head branch | ||
branch: | ||
type: string | ||
required: true | ||
description: The name of the head branch | ||
outputs: | ||
pr_id: | ||
description: The ID of the PR found | ||
value: ${{ jobs.prdetails.outputs.pr_id }} | ||
head_branch: | ||
description: The head branch of the PR found | ||
value: ${{ jobs.prdetails.outputs.head_branch }} | ||
base_branch: | ||
description: The base branch of the PR found | ||
value: ${{ jobs.prdetails.outputs.base_branch }} | ||
|
||
jobs: | ||
prdetails: | ||
name: Find PR Details | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "🔍 Read PR details" | ||
id: details | ||
# We need to find the PR number that corresponds to the branch, which we do by searching the GH API | ||
# The workflow_run event includes a list of pull requests, but it doesn't get populated for | ||
# forked PRs: https://docs.github.com/en/rest/reference/checks#create-a-check-run | ||
run: | | ||
head_branch='${{ inputs.owner }}:${{ inputs.branch }}' | ||
echo "Head branch: $head_branch" | ||
pulls_uri="https://api.github.com/repos/${{ github.repository }}/pulls?head=$(jq -Rr '@uri' <<<$head_branch)" | ||
pr_data=$(curl -s -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' "$pulls_uri") | ||
pr_number=$(jq -r '.[] | .number' <<< "$pr_data") | ||
echo "PR number: $pr_number" | ||
echo "::set-output name=prnumber::$pr_number" | ||
head_ref=$(jq -r '.[] | .head.ref' <<< "$pr_data") | ||
echo "Head ref: $head_ref" | ||
echo "::set-output name=headref::$head_ref" | ||
base_ref=$(jq -r '.[] | .base.ref' <<< "$pr_data") | ||
echo "Base ref: $base_ref" | ||
echo "::set-output name=baseref::$base_ref" | ||
outputs: | ||
pr_id: ${{ steps.details.outputs.prnumber }} | ||
head_branch: ${{ steps.details.outputs.headref }} | ||
base_branch: ${{ steps.details.outputs.baseref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: SonarCloud | ||
on: | ||
workflow_call: | ||
inputs: | ||
repo: | ||
type: string | ||
required: true | ||
description: The full name of the repo in org/repo format | ||
head_branch: | ||
type: string | ||
required: true | ||
description: The name of the head branch | ||
# We cannot use ${{ github.sha }} here as for pull requests it'll be a simulated merge commit instead | ||
revision: | ||
type: string | ||
required: true | ||
description: The git revision with which this sonar run should be associated | ||
|
||
# Coverage specific parameters, assumes coverage reports live in a /coverage/ directory | ||
coverage_workflow_name: | ||
type: string | ||
required: false | ||
description: The name of the workflow which uploaded the `coverage` artifact, if any | ||
coverage_run_id: | ||
type: string | ||
required: false | ||
description: The run_id of the workflow which upload the coverage relevant to this run | ||
|
||
# PR specific parameters | ||
pr_id: | ||
type: string | ||
required: false | ||
description: The ID number of the PR if this workflow is being triggered due to one | ||
base_branch: | ||
type: string | ||
required: false | ||
description: The base branch of the PR if this workflow is being triggered due to one | ||
|
||
# Org specific parameters | ||
main_branch: | ||
type: string | ||
required: false | ||
description: The default branch of the repository | ||
default: "develop" | ||
secrets: | ||
SONAR_TOKEN: | ||
required: true | ||
jobs: | ||
analysis: | ||
name: Analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "🧮 Checkout code" | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ inputs.repo }} | ||
ref: ${{ inputs.head_branch }} # checkout commit that triggered this workflow | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
# Fetch develop so that Sonar can identify new issues in PR builds | ||
- name: "📕 Fetch ${{ inputs.main_branch }}" | ||
if: inputs.head_branch != inputs.main_branch | ||
run: git rev-parse HEAD && git fetch origin ${{ inputs.main_branch }}:${{ inputs.main_branch }} && git status && git rev-parse HEAD | ||
|
||
# There's a 'download artifact' action, but it hasn't been updated for the workflow_run action | ||
# (https://github.com/actions/download-artifact/issues/60) so instead we get this mess: | ||
- name: "📥 Download Coverage Report" | ||
uses: dawidd6/action-download-artifact@v2 | ||
if: inputs.coverage_workflow_name | ||
with: | ||
workflow: ${{ inputs.coverage_workflow_name }} | ||
run_id: ${{ inputs.coverage_run_id }} | ||
name: coverage | ||
path: coverage | ||
|
||
- name: "🔍 Read package.json version" | ||
id: version | ||
uses: martinbeentjes/npm-get-version-action@main | ||
|
||
- name: "🩻 SonarCloud Scan" | ||
uses: SonarSource/sonarcloud-github-action@master | ||
with: | ||
args: > | ||
-Dsonar.projectVersion=${{ steps.version.outputs.current-version }} | ||
-Dsonar.scm.revision=${{ inputs.revision }} | ||
-Dsonar.pullrequest.key=${{ inputs.pr_id }} | ||
-Dsonar.pullrequest.branch=${{ inputs.pr_id && inputs.head_branch }} | ||
-Dsonar.pullrequest.base=${{ inputs.pr_id && inputs.base_branch }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Upgrade Dependencies | ||
on: | ||
workflow_dispatch: { } | ||
workflow_call: | ||
secrets: | ||
ELEMENT_BOT_TOKEN: | ||
required: true | ||
jobs: | ||
upgrade: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
cache: 'yarn' | ||
|
||
- name: Upgrade | ||
run: yarn upgrade && yarn install | ||
|
||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.ELEMENT_BOT_TOKEN }} | ||
branch: actions/upgrade-deps | ||
delete-branch: true | ||
title: Upgrade dependencies | ||
labels: | | ||
Dependencies | ||
T-Task | ||
- name: Enable automerge | ||
uses: peter-evans/enable-pull-request-automerge@v2 | ||
if: steps.cpr.outputs.pull-request-operation == 'created' | ||
with: | ||
token: ${{ secrets.ELEMENT_BOT_TOKEN }} | ||
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.