-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upgrade/element web v1.11.39 #663
Merged
Merged
Changes from 250 commits
Commits
Show all changes
295 commits
Select commit
Hold shift + click to select a range
96cf705
Upgrade matrix-js-sdk to 25.1.0
RiotRobot 81397ff
Upgrade matrix-react-sdk to 3.72.0
RiotRobot e902a0b
Prepare changelog for v1.11.31
RiotRobot df8f841
v1.11.31
RiotRobot 8274ad6
Merge branch 'master' into develop
RiotRobot 6e73a2b
Reset matrix-js-sdk back to develop branch
RiotRobot 1e7d001
Reset matrix-react-sdk back to develop branch
RiotRobot cc5914a
Allow welcome.html logo to be replaced by config (#25339)
t3chguy 9457af2
Improve bundle size and add webpack-bundle-analyzer (#25337)
t3chguy d7a98fe
Handle trailing dot FQDNs for domain-specific config.json files (#25351)
t3chguy d01eabd
Remove old ansible comments (#25352)
t3chguy 88c5395
Fix analyse:webpack-bundles script (#25353)
t3chguy 122d4d3
Increase yarn timeout (#25377)
t3chguy 23bfce8
Translations update from Weblate (#25382)
RiotTranslateBot 0fe50e0
Upgrade matrix-react-sdk to 3.73.0-rc.1
RiotRobot 4132298
Upgrade matrix-js-sdk to 25.2.0-rc.4
RiotRobot e16f124
Prepare changelog for v1.11.32-rc.1
RiotRobot fa103b7
v1.11.32-rc.1
RiotRobot bb52c13
Update typescript-eslint monorepo to v5.59.5 (#25386)
renovate[bot] 11a8fb3
Update dependency eslint-plugin-unicorn to v47 (#25389)
renovate[bot] a68c535
Update dependency @types/node to v16.18.30 (#25385)
renovate[bot] 0a5173f
Update all non-major dependencies (#25387)
renovate[bot] 0bdc59a
Upgrade matrix-react-sdk to 3.73.0-rc.2
RiotRobot ed1eaf6
Upgrade matrix-js-sdk to 25.2.0-rc.5
RiotRobot 6b5c792
Prepare changelog for v1.11.32-rc.2
RiotRobot e526bfd
v1.11.32-rc.2
RiotRobot 6b7f71f
vector/index.html: Allow fetching blob urls (#25336)
SuperKenVery 3c7a993
Track release blockers in Matrix room header (#25427)
t3chguy 6ab7a28
Update pending-reviews.yaml
t3chguy 22b96e0
Update pending-reviews.yaml
t3chguy 4296005
Update pending-reviews.yaml
t3chguy 8c97de4
Update build_develop.yml
t3chguy ee4679f
Update build_develop.yml
t3chguy 8997b84
Update build_develop.yml
t3chguy 71800ba
Redirect to the SSO page if `sso_redirect_options.on_welcome_page` is…
dhenneke faf626e
Merge branch 'develop' into staging
RiotRobot 5b904c0
Upgrade matrix-react-sdk to 3.73.0-rc.3
RiotRobot 86eaa57
Upgrade matrix-js-sdk to 26.0.0-rc.1
RiotRobot 0a26b57
Prepare changelog for v1.11.32-rc.3
RiotRobot df6423b
v1.11.32-rc.3
RiotRobot fea43b7
Update typescript-eslint monorepo to v5.59.7 (#25503)
renovate[bot] 82f231d
Update all non-major dependencies (#25504)
renovate[bot] f965f20
Update dependency jest-canvas-mock to v2.5.1 (#25506)
renovate[bot] 50bfa7e
Update cloudflare/pages-action digest to f0a1cd5 (#25501)
renovate[bot] 2a078dd
Update dependency @types/node to v16.18.34 (#25502)
renovate[bot] 945c079
Update dependency @sentry/webpack-plugin to v2 (#25507)
renovate[bot] bd8fabc
Upgrade matrix-js-sdk to 26.0.0
RiotRobot c127359
Upgrade matrix-react-sdk to 3.73.0
RiotRobot 8fe89f2
Prepare changelog for v1.11.32
RiotRobot e918170
v1.11.32
RiotRobot 69ad6c3
Merge branch 'master' into develop
RiotRobot a7208cc
Reset matrix-js-sdk back to develop branch
RiotRobot 0504c82
Reset matrix-react-sdk back to develop branch
RiotRobot 569c904
Add documentation for config to skip widget_build_url for DM rooms (#…
t3chguy fa21a0e
Upgrade matrix-js-sdk to 26.0.1
RiotRobot 9358c41
Upgrade matrix-react-sdk to 3.73.1
RiotRobot 2ec33e8
Prepare changelog for v1.11.33
RiotRobot 322dab0
v1.11.33
RiotRobot b5b584d
Merge branch 'master' into develop
RiotRobot f8b8f17
Reset matrix-js-sdk back to develop branch
RiotRobot 4ef9a60
Reset matrix-react-sdk back to develop branch
RiotRobot 0817064
Translations update from Weblate (#25577)
RiotTranslateBot 1a0a15a
Upgrade matrix-js-sdk to 26.1.0-rc1
RiotRobot 5ba75a3
Upgrade matrix-react-sdk to 3.74.0-rc1
RiotRobot 89a28b1
Prepare changelog for v1.11.34-rc1
RiotRobot 15192b9
v1.11.34-rc1
RiotRobot 37203d1
Document help_url and help_encryption_url (#25549)
t3chguy 2d09b82
Remove `feature_favourite_messages` as it is has been abandoned for n…
t3chguy 2b31b8d
Fix error when generating error for polling for updates (#25609)
t3chguy 0417473
Deprecate new breadcrumbs (#25617)
germain-gg 104dcad
Upgrade matrix-js-sdk to 26.1.0
RiotRobot b73a01a
Upgrade matrix-react-sdk to 3.74.0
RiotRobot 1c403b7
Prepare changelog for v1.11.34
RiotRobot 2cacd89
v1.11.34
RiotRobot f699c6f
Merge branch 'master' into develop
RiotRobot 41aa36e
Reset matrix-js-sdk back to develop branch
RiotRobot 3609ab8
Reset matrix-react-sdk back to develop branch
RiotRobot 278c494
Point develop.element.io to our Element Call + LiveKit experiment (#2…
robintown 86be392
Remove the ACAO header which is added by default on Cloudflare Pages …
laurencegill 0b6e028
Revert "Point develop.element.io to our Element Call + LiveKit experi…
toger5 33eb055
Update docker/build-push-action digest to 2eb1c19 (#25583)
renovate[bot] 130ea18
Point develop.element.io to our Element Call + LiveKit experiment (#2…
robintown 1e67eb2
Bump semver from 7.5.1 to 7.5.2 (#25661)
dependabot[bot] bdbae36
Update docker/metadata-action digest to 818d4b7 (#25585)
renovate[bot] e4bf321
document io.element.e2ee.force_disable (#25662)
727ed6f
Translations update from Weblate (#25669)
RiotTranslateBot a0ca535
Upgrade matrix-react-sdk to 3.75.0-rc.1
RiotRobot 9c8027d
Upgrade matrix-js-sdk to 26.2.0-rc.1
RiotRobot b64cf2e
Prepare changelog for v1.11.35-rc.1
RiotRobot 30bff44
v1.11.35-rc.1
RiotRobot 4ab85cb
Update dependency @types/node to v16.18.35 (#25590)
renovate[bot] 6113541
Update dependency @types/jest to v29.5.2 (#25589)
renovate[bot] f35bbf0
Update typescript-eslint monorepo to v5.60.0 (#25591)
renovate[bot] 8b481fd
Update docker/setup-buildx-action digest to ecf9528 (#25586)
renovate[bot] 9be30a8
Update docker/login-action digest to 465a078 (#25584)
renovate[bot] cd3a88e
Update docker/setup-qemu-action digest to 2b82ce8 (#25587)
renovate[bot] 51baaf6
Update peter-evans/dockerhub-description digest to dc67fad (#25671)
renovate[bot] 6bbc2b8
remove auth params from url after login attempt (#25664)
0299aef
Conform more of the codebase to strictNullChecks & noImplicitAny (#25…
t3chguy 4f1ce3c
Update all non-major dependencies (#25588)
renovate[bot] 7164aeb
Align develop.e.io cloudflare pages headers with other deploys (#25700)
t3chguy 53ac1d1
Upgrade matrix-react-sdk to 3.75.0
RiotRobot eec9543
Upgrade matrix-js-sdk to 26.2.0
RiotRobot aa55a2f
Prepare changelog for v1.11.35
RiotRobot c286617
v1.11.35
RiotRobot ab158ce
Merge branch 'master' into develop
RiotRobot 210a8ee
Reset matrix-react-sdk back to develop branch
RiotRobot faa602d
Reset matrix-js-sdk back to develop branch
RiotRobot d31a498
Tweak branch matching to allow not applying outside of PRs for matrix…
t3chguy 01a234a
Update matrix-react-sdk yarn.lock
t3chguy 658e282
Enable strictNullChecks and noImplicitAny (#25724)
t3chguy fad458d
Enable strictPropertyInitialization (#25729)
t3chguy 6726b93
Enable strictFunctionTypes (#25730)
t3chguy 0a4a205
Enable strictPropertyInitialization (#25735)
t3chguy bac0da3
Deprecate customisations in favour of Module API (#25736)
t3chguy d18c69e
Bump stylelint from 15.9.0 to 15.10.1 (#25739)
dependabot[bot] 9ec3f79
Bump tough-cookie from 4.1.2 to 4.1.3 (#25743)
dependabot[bot] 93c1710
Allow default_server_config as a fallback config (#25682)
ShadowRZ ccb0a30
Utility automation for updating topics as part of release process (#2…
t3chguy a4eb2f4
Update update-topics.yaml
t3chguy 98e36ff
Add `default_server_config` fallback to element.io configs (#19695)
aaronraimist 9610326
Update update-topics.yaml
t3chguy 71ab304
Update update-topics.yaml
t3chguy cb2d5ef
Update update-topics.yaml
t3chguy 4c9baa6
Update update-topics.yaml
t3chguy 29037c8
Update update-topics.yaml
t3chguy 77db00c
Update update-topics.yaml
t3chguy 80075ee
Update update-topics.yaml
t3chguy 311c5fe
Delete redundant make-icons.sh (#25747)
t3chguy ef30662
store fragmentafterlogin in sesison storage for oidc login (#25688)
a952f25
Translations update from Weblate (#25750)
RiotTranslateBot 3b3f12f
Update dependency @matrix-org/react-sdk-module-api to v1 (#25754)
renovate[bot] f859db9
Upgrade matrix-js-sdk to 27.0.0-rc.1
RiotRobot 137f5c9
Upgrade matrix-react-sdk to 3.76.0-rc.1
RiotRobot ea0edf7
Prepare changelog for v1.11.36-rc.1
RiotRobot 98f0735
v1.11.36-rc.1
RiotRobot abc5593
Update update-topics.yaml
t3chguy 5a701c4
Update logging ignore list comment (#25769)
t3chguy 453a361
Remove rageshake server from config.sample.json (#25772)
t3chguy da0b658
Update babel monorepo (#25505)
renovate[bot] 30aff46
Update dependency @types/node to v16.18.38 (#25758)
renovate[bot] 6508aca
Update jest (#25760)
renovate[bot] d67db02
Update dependency stylelint-config-standard to v34 (#25765)
renovate[bot] 231d338
Update typescript-eslint monorepo to v5.61.0 (#25761)
renovate[bot] 9856863
Update update-topics.yaml
t3chguy fe3d7f3
Update update-topics.yaml
t3chguy 767c30f
Update update-topics.yaml
t3chguy 0e97a17
Fix regex not handling rc versions
t3chguy b89b000
Update update-topics.yaml
t3chguy a84349f
Deprecate camelCase config options (#25800)
t3chguy d77877d
Upgrade matrix-js-sdk to 27.0.0-rc.2
RiotRobot 3ee4cbd
Upgrade matrix-react-sdk to 3.76.0-rc.2
RiotRobot 49c7821
Prepare changelog for v1.11.36-rc.2
RiotRobot dd9678d
v1.11.36-rc.2
RiotRobot 93e6ee1
Switch to the new `session` API for screen-sharing (#25802)
SimonBrandner 48044f3
Update all non-major dependencies (#25759)
renovate[bot] e68583a
Test: don't unmount `MatrixChat` before setup is finished (#25783)
42afb01
Correct Jitsi preferred_domain property (#25813)
benbz 048d8c4
Remove redundant dependencies (#25814)
t3chguy 44dde72
Update docker/setup-buildx-action digest to 4c0219f (#25757)
renovate[bot] 4cf4dc9
Lock file maintenance (#25145)
renovate[bot] c1bbaf6
Removing stale labs flag (#25823)
germain-gg 9be4fcf
Upgrade matrix-js-sdk to 27.0.0
RiotRobot af929fc
Upgrade matrix-react-sdk to 3.76.0
RiotRobot 29ca7a4
Prepare changelog for v1.11.36
RiotRobot 494cb39
v1.11.36
RiotRobot 19d663d
Merge branch 'master' into develop
RiotRobot 1c420b4
Reset matrix-js-sdk back to develop branch
RiotRobot 2753bc9
Reset matrix-react-sdk back to develop branch
RiotRobot cc8afed
Avoid using deprecated config.json key casing (#25833)
t3chguy 6406ae1
Translations update from Weblate (#25856)
RiotTranslateBot fef081c
Upgrade matrix-react-sdk to 3.77.0-rc.1
RiotRobot a618f95
Upgrade matrix-js-sdk to 27.1.0-rc.1
RiotRobot 4eae1d4
Prepare changelog for v1.11.37-rc.1
RiotRobot 7018f78
v1.11.37-rc.1
RiotRobot 58e40c5
Update dependency eslint-plugin-unicorn to v48 (#25859)
renovate[bot] a19c3f5
Update dependency @types/node to v16.18.39 (#25857)
renovate[bot] 790ff16
Update all non-major dependencies (#25858)
renovate[bot] 5644c4e
Lock file maintenance (#25860)
renovate[bot] b404d2d
Lock file maintenance (#25886)
renovate[bot] a0558a8
Document 'feature_new_room_decoration_ui' (#25890)
germain-gg 2abff92
Upgrade matrix-react-sdk to 3.77.0
RiotRobot 69c43bb
Upgrade matrix-js-sdk to 27.1.0
RiotRobot fc94e9b
Prepare changelog for v1.11.37
RiotRobot a0e0df3
v1.11.37
RiotRobot 3b37081
Merge branch 'master' into develop
RiotRobot 50ca01f
Reset matrix-react-sdk back to develop branch
RiotRobot 4f790eb
Reset matrix-js-sdk back to develop branch
RiotRobot c6756ea
Transpile @vector-im/compound-web with babel (#25906)
germain-gg e395178
Package release builds of element-web in package.element.io debs (#25…
t3chguy 8fc0763
Remove feature_right_panel_default_open (#25915)
germain-gg bb223ee
[Backport staging] Package release builds of element-web in package.e…
RiotRobot 0b72e92
Upgrade matrix-react-sdk to 3.77.1
RiotRobot ab7536d
Prepare changelog for v1.11.38
RiotRobot e059524
v1.11.38
RiotRobot 595ddc3
Merge branch 'master' into develop
RiotRobot 7a3e36d
Reset matrix-js-sdk back to develop branch
RiotRobot 030b1fb
Reset matrix-react-sdk back to develop branch
RiotRobot 1093b41
Update build_debian.yaml
t3chguy 15836ac
Update labs.md for knock rooms (#25923)
charlynguyen b1129e4
Translations update from Weblate (#25935)
RiotTranslateBot 84fe974
Upgrade matrix-react-sdk to 3.78.0-rc.1
RiotRobot 3cce4de
Upgrade matrix-js-sdk to 27.2.0-rc.1
RiotRobot f77d968
Prepare changelog for v1.11.39-rc.1
RiotRobot f676406
v1.11.39-rc.1
RiotRobot 70742e0
Upgrade matrix-react-sdk to 3.78.0
RiotRobot 8c33ebf
Upgrade matrix-js-sdk to 27.2.0
RiotRobot 7dabb3c
Prepare changelog for v1.11.39
RiotRobot 9a650bd
v1.11.39
RiotRobot e5e9543
Merge tag 'v1.11.39' into upgrade/element-web-v1.11.39 - conflicts so…
estellecomment e61a3ea
Patches that did not conflict
estellecomment c7b6135
Fixed patch export-room-members
estellecomment 73f88f2
Patches without conflict, this time use the right element version !
estellecomment e903520
Fix activate-cross-signing-and-secure-storage-react - just markup cha…
estellecomment a57cd08
Fixed patch export-room-members, this time with the right element ver…
estellecomment 459e69d
git mv are-external-users-allowed-in-room patch to up the version
estellecomment c3e63da
Update patch are-external-users-allowed-in-room. RoomHeader has moved…
estellecomment a710cba
Update auto-accept-tac.
estellecomment f6c5b47
Remove backport-html-export-security-fix patch. According to issue it…
estellecomment 50d49f8
Fixed better-help-settings-2. We now use a field in config instead of…
estellecomment 185c582
update content-scanner patch
estellecomment b3262e4
Rename disable-access-options patch to up version
estellecomment 5316ce9
Update disable-access-options patch
estellecomment c6767e5
Update error-tchap-is-down patch
estellecomment 7d684e4
Update hide-discovery-email-phone-settings patch
estellecomment 54058e5
Remove hide-location-if-no-map-server patch, replaced by a UIFeature
estellecomment 8b689dc
git mv hide-room-alias-settings to up version
estellecomment 1800812
Upgrade hide-room-alias-settings patch
estellecomment 037295c
Upgrade password-policy patch
estellecomment 863b591
Upgrade simplify-exchange-key-message
estellecomment 09cf74d
Upgrade use-the-term-people-not-direct-messages patch
estellecomment 3e77a0c
Merge branch 'develop_tchap' into upgrade/element-web-v1.11.39
estellecomment 549709f
Upgrade tchap-features-from-config patch
estellecomment b0335dd
Use a yarn.lock based on element-web\'s. Our regenerated version was …
estellecomment 28ed707
Force modernizr to 3.12.0. When using the latest 3.13.0, it causes an…
estellecomment 1f4f67e
Adjust size of TchapExternalRoomHeader, the rem has changed.
estellecomment 7b8c66f
upgrade login
odelcroi 238d183
fix login upgrade
odelcroi 420906b
fix prettier in config
odelcroi 2374d52
chore: in worflows get node version from package.json (#677)
odelcroi 334b26a
Merge branch 'develop_tchap' into upgrade/element-web-v1.11.39
estellecomment 36142a0
Fix TchapCreateRoomDialog test : remove snapshot, testing presence of…
estellecomment 464d976
Add tests for default value of switch
estellecomment f4b3955
Fix createroom test : classname changed
estellecomment 0fdba8b
Fix room access settings cypress test
estellecomment 91b49ce
try : upgrade patch security user settings with new device panel (#678)
odelcroi 2e61687
Fix linter
estellecomment defcf26
remove unsused translation
odelcroi 15855bd
remove element.io specific files
odelcroi cd9e411
remove unused build workflow
odelcroi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: Questions & support | ||
url: https://tchap.beta.gouv.fr/#contact | ||
|
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,56 @@ | ||
name: Build Debian package | ||
on: | ||
release: | ||
types: [published] | ||
concurrency: ${{ github.workflow }} | ||
jobs: | ||
build: | ||
name: Build package | ||
if: github.event.release.prerelease == false | ||
environment: packages.element.io | ||
runs-on: ubuntu-latest | ||
env: | ||
R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }} | ||
R2_URL: ${{ vars.CF_R2_S3_API }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Prepare | ||
run: | | ||
mkdir -p /tmp/element-web-debian/DEBIAN | ||
cp -R debian/ /tmp/element-web-debian/DEBIAN/ | ||
mkdir -p /tmp/element-web-debian/usr/share/element-web/ | ||
|
||
wget https://github.com/vector-im/element-web/releases/download/$VERSION/element-$VERSION.tar.gz | ||
mv element-* /tmp/element-web-debian/usr/share/element-web | ||
mv debian/usr/share/element-web/config.sample.json /tmp/element-web-debian/usr/share/element-web/config.json | ||
env: | ||
VERSION: ${{ github.ref_name }} | ||
|
||
- name: Build deb package | ||
run: | | ||
VERSION=$(cat package.json | jq -r .version) | ||
chmod -R u=rw,go=r /tmp/element-web-debian/usr/share/element-web/ | ||
dpkg-deb -Zxz --root-owner-group -VVersion=$VERSION --build /tmp/element-web-debian element-web.deb | ||
|
||
# For now just upload the artifact to github | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: debs | ||
path: "*.deb" | ||
retention-days: 14 | ||
|
||
#- name: Upload incoming deb | ||
# run: aws s3 cp element-io-archive-keyring.deb "s3://$R2_INCOMING_BUCKET" --endpoint-url "$R2_URL" --region auto | ||
# env: | ||
# AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }} | ||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }} | ||
|
||
#reprepro: | ||
# needs: build | ||
# name: Run reprepro | ||
# if: inputs.deploy && github.event.release.prerelease == false | ||
# uses: ./.github/workflows/reprepro.yaml | ||
# secrets: inherit | ||
# with: | ||
# incoming: element-web.deb |
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,95 @@ | ||
name: Update release topics | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
expected_status: | ||
description: What type of release is the next expected release | ||
required: true | ||
default: RC | ||
type: choice | ||
options: | ||
- RC | ||
- Release | ||
expected_date: | ||
description: Expected release date e.g. July 11th | ||
required: true | ||
type: string | ||
concurrency: ${{ github.workflow }} | ||
jobs: | ||
bot: | ||
name: Release topic update | ||
runs-on: ubuntu-latest | ||
environment: Matrix | ||
steps: | ||
- uses: actions/github-script@v6 | ||
env: | ||
HS_URL: ${{ secrets.BETABOT_HS_URL }} | ||
LOBBY_ROOM_ID: ${{ secrets.ROOM_ID }} | ||
PUBLIC_ROOM_ID: "!YTvKGNlinIzlkMTVRl:matrix.org" | ||
ANNOUNCEMENT_ROOM_ID: "!bijaLdadorKgNGtHdA:matrix.org" | ||
TOKEN: ${{ secrets.BETABOT_ACCESS_TOKEN }} | ||
RELEASE_STATUS: "Release status: ${{ inputs.expected_status }} expected ${{ inputs.expected_date }}" | ||
with: | ||
script: | | ||
const { HS_URL, TOKEN, RELEASE_STATUS, LOBBY_ROOM_ID, PUBLIC_ROOM_ID, ANNOUNCEMENT_ROOM_ID } = process.env; | ||
|
||
const repo = context.repo; | ||
const { data } = await github.rest.repos.getLatestRelease({ | ||
owner: repo.owner, | ||
repo: repo.repo, | ||
}); | ||
console.log("Found latest version: " + data.tag_name); | ||
|
||
const releaseTopic = `Stable: ${data.tag_name} | ${RELEASE_STATUS}`; | ||
console.log("Release topic: " + releaseTopic); | ||
|
||
const regex = /Stable: v(.+) \| Release status: (\w+) expected (\w+ \d+\w\w)/gm; | ||
|
||
async function updateReleaseInTopic(roomId) { | ||
const apiUrl = `${HS_URL}/_matrix/client/v3/rooms/${roomId}/state/m.room.topic/`; | ||
const headers = { | ||
"Content-Type": "application/json", | ||
"Authorization": `Bearer ${TOKEN}`, | ||
}; | ||
await fetch(`${HS_URL}/_matrix/client/v3/rooms/${roomId}/join`, { | ||
method: "POST", | ||
headers, | ||
body: "{}", | ||
}); | ||
|
||
let res = await fetch(apiUrl, { | ||
method: "GET", | ||
headers, | ||
}); | ||
|
||
const data = await res.json(); | ||
const topic = data.topic.replace(regex, releaseTopic); | ||
if (topic === data.topic) { | ||
console.log(roomId, "nothing to do"); | ||
return; | ||
} | ||
if (data["org.matrix.msc3765.topic"]) { | ||
data["org.matrix.msc3765.topic"].forEach(d => { | ||
d.body = d.body.replace(regex, releaseTopic); | ||
}); | ||
} | ||
|
||
res = await fetch(apiUrl, { | ||
method: "PUT", | ||
body: JSON.stringify({ | ||
...data, | ||
topic, | ||
}), | ||
headers, | ||
}); | ||
|
||
if (res.ok) { | ||
console.log(roomId, "topic updated:", topic); | ||
} else { | ||
console.log(roomId, await res.text()); | ||
} | ||
} | ||
|
||
await updateReleaseInTopic(LOBBY_ROOM_ID); | ||
await updateReleaseInTopic(PUBLIC_ROOM_ID); | ||
await updateReleaseInTopic(ANNOUNCEMENT_ROOM_ID); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this build? not sure we need it