Repository navigation
api.stm.info GTFS-RT like provider > + service update : regex for severity⬜ℹ️⚠️ override - #142
Merged
Merged
Conversation
…arning regex for severity override
2 tasks done
api.stm.info GTFS-RT like provider > add service update none/info/warning regex for severity overrideapi.stm.info GTFS-RT like provider > + service update : regex for severity⬜ℹ️⚠️ override
mmathieum
marked this pull request as ready for review
May 7, 2026 14:01
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to dynamically determine service update severity by matching descriptions against regex patterns defined in resources. Key changes include adding new resource arrays, implementing regex retrieval in StmInfoApiProvider, and updating StmInfoServiceUpdateProvider to apply these patterns. Feedback highlights a logic bug where the severity variable is incorrectly scoped outside the language loop, causing state leakage between iterations. Additionally, it is recommended to cache compiled Regex objects to avoid the performance overhead of re-compiling them during every refresh cycle.
montransit
added a commit
to mtransitapps/mtransit-for-android
that referenced
this pull request
May 7, 2026
…vider > + service update : regex for severity⬜ℹ️⚠️ override mtransitapps/commons-android#142
montransit
added a commit
to mtransitapps/ca-guelph-transit-bus-android
that referenced
this pull request
May 7, 2026
…vider > + service update : regex for severity⬜ℹ️⚠️ override mtransitapps/commons-android#142
montransit
added a commit
to mtransitapps/ca-ottawa-oc-transpo-bus-android
that referenced
this pull request
May 8, 2026
…parser': - commons: Store listing > feature graphics > 1-line max length tweak - commons: Add push trigger on `config/input_url` and `config/input_url_next` to mt-download-data workflow mtransitapps/commons#733 - commons: Store listing > full/short desc > compat w/ `api.stm.info` provider mtransitapps/commons#732 - commons: Encrypt file > auto dest file path from source - commons: Generate `fr/gtfs_rts_strings.xml` & ignore location inside agency name. mtransitapps/commons#730 - commons: Build(deps): Bump androidx.webkit:webkit from 1.15.0 to 1.16.0 in the androidx group across 1 directory mtransitapps/commons#731 - commons-android: `api.stm.info` GTFS-RT like provider > + service update : regex for severity⬜ℹ️⚠️ override mtransitapps/commons-android#142 - commons-android: FR `Horaire`... mtransitapps/commons-android#141 - commons-java: Source label: hide host `google.com` mtransitapps/commons-java#35 - commons-java: Strings cleaner > FR > remove `ligne` from route long name & `station` from trip head-sign mtransitapps/commons-java#34 - parser: Missing route colors > do not fix colors from JSON config. - parser: JSON config > + `additional_languages` & `stop_code_cleaners` mtransitapps/parser#66
montransit
added a commit
to mtransitapps/ca-ottawa-oc-transpo-train-android
that referenced
this pull request
May 8, 2026
…parser': - commons: Store listing > feature graphics > 1-line max length tweak - commons: Add push trigger on `config/input_url` and `config/input_url_next` to mt-download-data workflow mtransitapps/commons#733 - commons: Store listing > full/short desc > compat w/ `api.stm.info` provider mtransitapps/commons#732 - commons: Encrypt file > auto dest file path from source - commons: Generate `fr/gtfs_rts_strings.xml` & ignore location inside agency name. mtransitapps/commons#730 - commons: Build(deps): Bump androidx.webkit:webkit from 1.15.0 to 1.16.0 in the androidx group across 1 directory mtransitapps/commons#731 - commons: Update GTFS Validator from `7.0.0` to `8.0.0` mtransitapps/commons#729 - commons: Build(deps): Bump com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk from 1.0.0 to 1.0.1 mtransitapps/commons#727 - commons: Merge branch 'master' of github.com:mtransitapps/commons - commons: README > HTTPS for apache.org - commons: Build(deps): Bump android-gradlePlugin from 9.2.0 to 9.2.1 mtransitapps/commons#728 - commons-android: `api.stm.info` GTFS-RT like provider > + service update : regex for severity⬜ℹ️⚠️ override mtransitapps/commons-android#142 - commons-android: FR `Horaire`... mtransitapps/commons-android#141 - commons-android: cleanup - commons-android: GTFS RT > Trip Updates > cache no data & trip ID out of sync log... mtransitapps/commons-android#140 - commons-java: Source label: hide host `google.com` mtransitapps/commons-java#35 - commons-java: Strings cleaner > FR > remove `ligne` from route long name & `station` from trip head-sign mtransitapps/commons-java#34 - parser: Missing route colors > do not fix colors from JSON config. - parser: JSON config > + `additional_languages` & `stop_code_cleaners` mtransitapps/parser#66
montransit
added a commit
to mtransitapps/ca-cranbrook-transit-system-bus-android
that referenced
this pull request
May 8, 2026
…parser': - commons: Store listing > feature graphics > 1-line max length tweak - commons: Add push trigger on `config/input_url` and `config/input_url_next` to mt-download-data workflow mtransitapps/commons#733 - commons: Store listing > full/short desc > compat w/ `api.stm.info` provider mtransitapps/commons#732 - commons: Encrypt file > auto dest file path from source - commons: Generate `fr/gtfs_rts_strings.xml` & ignore location inside agency name. mtransitapps/commons#730 - commons: Build(deps): Bump androidx.webkit:webkit from 1.15.0 to 1.16.0 in the androidx group across 1 directory mtransitapps/commons#731 - commons: Update GTFS Validator from `7.0.0` to `8.0.0` mtransitapps/commons#729 - commons: Build(deps): Bump com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk from 1.0.0 to 1.0.1 mtransitapps/commons#727 - commons: Merge branch 'master' of github.com:mtransitapps/commons - commons: README > HTTPS for apache.org - commons: Build(deps): Bump android-gradlePlugin from 9.2.0 to 9.2.1 mtransitapps/commons#728 - commons-android: `api.stm.info` GTFS-RT like provider > + service update : regex for severity⬜ℹ️⚠️ override mtransitapps/commons-android#142 - commons-android: FR `Horaire`... mtransitapps/commons-android#141 - commons-android: cleanup - commons-java: Source label: hide host `google.com` mtransitapps/commons-java#35 - commons-java: Strings cleaner > FR > remove `ligne` from route long name & `station` from trip head-sign mtransitapps/commons-java#34 - parser: Missing route colors > do not fix colors from JSON config. - parser: JSON config > + `additional_languages` & `stop_code_cleaners` mtransitapps/parser#66
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
api.stm.infoGTFS-RT-like API ca-montreal-stm-subway-android#10