mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Attempt to check public org membership before complaining about signoff.
This commit is contained in:
@@ -88,7 +88,25 @@ const allowList = [
|
|||||||
"yostyle",
|
"yostyle",
|
||||||
]
|
]
|
||||||
|
|
||||||
const requiresSignOff = !allowList.includes(user)
|
// We ignore signoff requirements for employees of Element
|
||||||
|
// as copyright assignment is covered by our employee contracts.
|
||||||
|
|
||||||
|
var memberOfElement
|
||||||
|
|
||||||
|
try {
|
||||||
|
github.api.rest.orgs.checkPublicMembership({
|
||||||
|
org: "vector-im",
|
||||||
|
username: user
|
||||||
|
})
|
||||||
|
memberOfElement = true
|
||||||
|
} catch (err) {
|
||||||
|
// Raises an error if 404 is returned = not member
|
||||||
|
memberOfElement = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const requiresSignOff = !allowList.includes(user) || !memberOfElement
|
||||||
|
|
||||||
if (requiresSignOff) {
|
if (requiresSignOff) {
|
||||||
const hasPRBodySignOff = pr.body.includes(signOff)
|
const hasPRBodySignOff = pr.body.includes(signOff)
|
||||||
|
|||||||
Reference in New Issue
Block a user