Skip to content

Commit 74bf70b

Browse files
authored
Merge branch 'master' into olvr-connect
2 parents 969cb15 + ab966f2 commit 74bf70b

46 files changed

Lines changed: 1427 additions & 48 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Review Labels (apply)
2+
3+
# Runs after "Review Labels (trigger)" completes. Because workflow_run runs
4+
# in the base-repo context, github.token is writable even for PRs from
5+
# forks -- so the actual label edits happen here.
6+
7+
on:
8+
workflow_run:
9+
workflows: ["Review Labels (trigger)"]
10+
types: [completed]
11+
12+
jobs:
13+
apply:
14+
runs-on: ubuntu-latest
15+
# Only act on successful runs of the trigger workflow that were started
16+
# by one of the events we expect. Anything else is ignored outright.
17+
if: >-
18+
github.event.workflow_run.conclusion == 'success' &&
19+
(github.event.workflow_run.event == 'pull_request_review' ||
20+
github.event.workflow_run.event == 'pull_request_target')
21+
permissions:
22+
pull-requests: write
23+
issues: write
24+
steps:
25+
- name: Download task artifact
26+
id: download
27+
uses: actions/download-artifact@v8
28+
with:
29+
name: label-task
30+
path: ./label-task
31+
run-id: ${{ github.event.workflow_run.id }}
32+
github-token: ${{ github.token }}
33+
continue-on-error: true
34+
35+
- name: Apply labels
36+
if: steps.download.outcome == 'success'
37+
env:
38+
GH_TOKEN: ${{ github.token }}
39+
run: |
40+
task_file="./label-task/task.txt"
41+
if [ ! -f "$task_file" ]; then
42+
echo "No task artifact; nothing to do."
43+
exit 0
44+
fi
45+
46+
pr_number=$(grep '^pr_number=' "$task_file" | cut -d= -f2-)
47+
action=$(grep '^action=' "$task_file" | cut -d= -f2-)
48+
repo="${{ github.repository }}"
49+
50+
if [ -z "$pr_number" ] || [ -z "$action" ]; then
51+
echo "Incomplete task; nothing to do."
52+
exit 0
53+
fi
54+
55+
# --- Security hardening (workflow_run trust boundary) ---
56+
# The artifact comes from a workflow that can be triggered by fork
57+
# PRs. Validate everything before acting so a forged/malformed task
58+
# cannot be used to mislabel an arbitrary PR or inject gh arguments.
59+
60+
# pr_number must be a plain positive integer.
61+
if ! printf '%s' "$pr_number" | grep -Eq '^[1-9][0-9]*$'; then
62+
echo "Invalid pr_number: '$pr_number'; aborting."
63+
exit 0
64+
fi
65+
66+
# action must be one of the known values.
67+
case "$action" in
68+
changes_requested|new_commits) ;;
69+
*) echo "Invalid action: '$action'; aborting."; exit 0 ;;
70+
esac
71+
72+
# The artifact's PR must match the head SHA that the triggering
73+
# workflow_run actually ran on. This binds the task to the run that
74+
# produced it, so a fork run cannot hand off a different PR's number.
75+
run_sha="${{ github.event.workflow_run.head_sha }}"
76+
pr_sha=$(gh pr view "$pr_number" --repo "$repo" \
77+
--json headRefOid --jq '.headRefOid' 2>/dev/null || true)
78+
if [ -n "$run_sha" ] && [ "$pr_sha" != "$run_sha" ]; then
79+
echo "PR #$pr_number head ($pr_sha) does not match triggering run ($run_sha); aborting."
80+
exit 0
81+
fi
82+
83+
echo "PR #$pr_number, action: $action"
84+
85+
case "$action" in
86+
changes_requested)
87+
# A reviewer requested changes -> flag the PR.
88+
gh pr edit "$pr_number" --repo "$repo" \
89+
--add-label "review issues"
90+
gh pr edit "$pr_number" --repo "$repo" \
91+
--remove-label "new review needed" 2>/dev/null || true
92+
;;
93+
new_commits)
94+
# New commits pushed -> only swap labels if the PR was
95+
# previously flagged with "review issues". Otherwise PRs that
96+
# were never reviewed would wrongly get "new review needed".
97+
has_label=$(gh pr view "$pr_number" --repo "$repo" \
98+
--json labels --jq '.labels[].name | select(. == "review issues")')
99+
if [ -z "$has_label" ]; then
100+
echo "PR does not have \"review issues\"; nothing to do."
101+
exit 0
102+
fi
103+
gh pr edit "$pr_number" --repo "$repo" \
104+
--add-label "new review needed"
105+
gh pr edit "$pr_number" --repo "$repo" \
106+
--remove-label "review issues" 2>/dev/null || true
107+
;;
108+
*)
109+
echo "Unknown action: $action"
110+
;;
111+
esac
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Review Labels (trigger)
2+
3+
# This workflow only DETECTS what label change is needed and hands it off
4+
# to the "Review Labels (apply)" workflow via an artifact. It does NOT
5+
# write labels itself, because the pull_request_review event runs with a
6+
# read-only token for PRs from forks. The apply workflow runs on
7+
# workflow_run, which always has a writable token in the base-repo context.
8+
9+
on:
10+
pull_request_review:
11+
types: [submitted]
12+
pull_request_target:
13+
branches:
14+
- master
15+
types: [synchronize]
16+
17+
jobs:
18+
detect:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Determine action
22+
id: detect
23+
run: |
24+
pr_number=""
25+
action=""
26+
27+
if [ "${{ github.event_name }}" = "pull_request_review" ]; then
28+
if [ "${{ github.event.review.state }}" = "changes_requested" ]; then
29+
pr_number="${{ github.event.pull_request.number }}"
30+
action="changes_requested"
31+
fi
32+
elif [ "${{ github.event_name }}" = "pull_request_target" ]; then
33+
# Skip "Update branch" merge commits (base branch merged into PR).
34+
# These have two parents where the second parent is the base branch
35+
# tip -- they represent no new author work, so labels should not swap.
36+
head_sha="${{ github.event.pull_request.head.sha }}"
37+
repo="${{ github.repository }}"
38+
parent_count=$(gh api "repos/$repo/commits/$head_sha" \
39+
--jq '.parents | length')
40+
if [ "$parent_count" -ge 2 ]; then
41+
second_parent=$(gh api "repos/$repo/commits/$head_sha" \
42+
--jq '.parents[1].sha')
43+
base_sha=$(gh api "repos/$repo/git/refs/heads/master" \
44+
--jq '.object.sha')
45+
if [ "$second_parent" = "$base_sha" ]; then
46+
echo "Head commit is an \"Update branch\" merge; skipping."
47+
echo "skip=true" >> "$GITHUB_OUTPUT"
48+
exit 0
49+
fi
50+
fi
51+
pr_number="${{ github.event.pull_request.number }}"
52+
action="new_commits"
53+
fi
54+
55+
if [ -z "$action" ]; then
56+
echo "No relevant action; skipping."
57+
echo "skip=true" >> "$GITHUB_OUTPUT"
58+
exit 0
59+
fi
60+
61+
mkdir -p ./label-task
62+
{
63+
echo "pr_number=$pr_number"
64+
echo "action=$action"
65+
} > ./label-task/task.txt
66+
echo "skip=false" >> "$GITHUB_OUTPUT"
67+
68+
- name: Upload task artifact
69+
if: steps.detect.outputs.skip == 'false'
70+
uses: actions/upload-artifact@v7
71+
with:
72+
name: label-task
73+
path: ./label-task/
74+
retention-days: 1

10ashara.com.lms.json

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
{
2-
"providerId": "10ashara.com",
3-
"providerName": "10ashara",
4-
"serviceId": "lms",
5-
"serviceName": "10ashara LMS",
6-
"syncPubKeyDomain": "domainconnect.10ashara.com",
7-
"version": 1,
8-
"logoUrl": "https://cdn.10ashara.com/home_logolight_filehome-logolight-fileashara-logosvgwebp.webp",
9-
"description": "Use these DNS records to connect your domain to 10ashara LMS.",
10-
"hostRequired": false,
11-
"records": [
12-
{
13-
"type": "A",
14-
"host": "@",
15-
"pointsTo": "%ip-address%",
16-
"ttl": 300
17-
},
18-
{
19-
"type": "CNAME",
20-
"host": "www",
21-
"pointsTo": "@",
22-
"ttl": 300
23-
}
24-
]
25-
}
2+
"providerId": "10ashara.com",
3+
"providerName": "10ashara",
4+
"serviceId": "lms",
5+
"serviceName": "10ashara LMS",
6+
"version": 2,
7+
"logoUrl": "https://cdn.10ashara.com/home_logolight_filehome-logolight-fileashara-logosvgwebp.webp",
8+
"description": "Connect your domain to 10ashara LMS. Configures routing and ownership verification.",
9+
"variableDescription": "verification-token: Unique subscription verification token. ip-address: Load balancer IP for your package tier.",
10+
"syncBlock": false,
11+
"syncPubKeyDomain": "domainconnect.10ashara.com",
12+
"syncRedirectDomain": "10ashara.com",
13+
"hostRequired": false,
14+
"records": [
15+
{
16+
"type": "TXT",
17+
"host": "_asharamulti-verify",
18+
"data": "%verification-token%",
19+
"ttl": 300
20+
},
21+
{
22+
"type": "A",
23+
"host": "@",
24+
"pointsTo": "%ip-address%",
25+
"ttl": 300
26+
},
27+
{
28+
"type": "CNAME",
29+
"host": "www",
30+
"pointsTo": "@",
31+
"ttl": 300
32+
}
33+
]
34+
}

addresstwo.com.mailgun.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"providerName": "AddressTwo",
44
"serviceId": "mailgun",
55
"serviceName": "Email Verification",
6-
"version": 1,
6+
"version": 2,
77
"logoUrl": "https://app.addresstwo.com/assets/images/adTwoAccessBarLogo.png",
88
"description": "Automatically configures DNS records so your domain can send and receive email via Mailgun.",
99
"syncBlock": false,
10-
"syncPubKeyDomain": "domainconnect.addresstwo.com",
10+
"syncPubKeyDomain": "cdn.addresstwo.com",
1111
"syncRedirectDomain": "addresstwo.com",
1212
"variableDescription": "%dkimValue%: Full DKIM TXT record value; %dkimSelector%: Full DKIM Selector value",
1313
"records": [
@@ -38,4 +38,4 @@
3838
"txtConflictMatchingPrefix": "v=DMARC1"
3939
}
4040
]
41-
}
41+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"providerId": "apollodeploy.com",
3+
"providerName": "Apollo Signal",
4+
"serviceId": "signal-sending-cname",
5+
"serviceName": "Email sending (CNAME DKIM)",
6+
"version": 1,
7+
"logoUrl": "https://apollodeploy.com/favicon.ico",
8+
"description": "Configures the DNS records required to send email with Apollo Signal when DKIM uses a CNAME selector: CNAME DKIM, MAIL FROM MX, and SPF for the bounce subdomain.",
9+
"variableDescription": "%dkimSelector%: DKIM selector label; %dkimPointsTo%: CNAME target hostname; %mailFromSubdomain%: MAIL FROM subdomain (e.g. bounce); %mailFromMx%: MX target hostname; %mailFromPriority%: MX priority; %spfInclude%: SPF include domain",
10+
"syncPubKeyDomain": "keys.apollodeploy.com",
11+
"syncRedirectDomain": "signal.apollodeploy.com",
12+
"syncBlock": false,
13+
"records": [
14+
{
15+
"type": "CNAME",
16+
"host": "%dkimSelector%._domainkey",
17+
"pointsTo": "%dkimPointsTo%",
18+
"ttl": 3600
19+
},
20+
{
21+
"type": "MX",
22+
"host": "%mailFromSubdomain%",
23+
"pointsTo": "%mailFromMx%",
24+
"priority": "%mailFromPriority%",
25+
"ttl": 3600
26+
},
27+
{
28+
"type": "SPFM",
29+
"host": "%mailFromSubdomain%",
30+
"spfRules": "include:%spfInclude%",
31+
"ttl": 3600
32+
}
33+
]
34+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"providerId": "apollodeploy.com",
3+
"providerName": "Apollo Signal",
4+
"serviceId": "signal-sending",
5+
"serviceName": "Email sending",
6+
"version": 1,
7+
"logoUrl": "https://apollodeploy.com/favicon.ico",
8+
"description": "Configures the DNS records required to send email with Apollo Signal: DKIM authentication, MAIL FROM MX, and SPF for the bounce subdomain.",
9+
"variableDescription": "%dkimSelector%: DKIM selector label; %dkimValue%: DKIM TXT record value; %mailFromSubdomain%: MAIL FROM subdomain (e.g. bounce); %mailFromMx%: MX target hostname; %mailFromPriority%: MX priority; %spfInclude%: SPF include domain",
10+
"syncPubKeyDomain": "keys.apollodeploy.com",
11+
"syncRedirectDomain": "signal.apollodeploy.com",
12+
"syncBlock": false,
13+
"records": [
14+
{
15+
"type": "TXT",
16+
"host": "%dkimSelector%._domainkey",
17+
"ttl": 3600,
18+
"data": "%dkimValue%"
19+
},
20+
{
21+
"type": "MX",
22+
"host": "%mailFromSubdomain%",
23+
"pointsTo": "%mailFromMx%",
24+
"priority": "%mailFromPriority%",
25+
"ttl": 3600
26+
},
27+
{
28+
"type": "SPFM",
29+
"host": "%mailFromSubdomain%",
30+
"spfRules": "include:%spfInclude%",
31+
"ttl": 3600
32+
}
33+
]
34+
}

appnest.ing.appnest.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"providerId": "appnest.ing",
3+
"providerName": "AppNest",
4+
"serviceId": "appnest",
5+
"serviceName": "AppNest app",
6+
"version": 1,
7+
"logoUrl": "https://appnest.ing/favicon.svg",
8+
"description": "Serves an app built on AppNest (appnest.ing) at the user's subdomain. One CNAME to AppNest's Cloudflare-for-SaaS fallback origin; the TLS certificate is issued automatically via HTTP domain-control validation once the record resolves. Removing the CNAME detaches the subdomain from AppNest.",
9+
"variableDescription": "This template uses no custom variables. The standard domain and host parameters select the subdomain the CNAME is written for.",
10+
"syncPubKeyDomain": "appnest.ing",
11+
"syncRedirectDomain": "dashboard.appnest.ing",
12+
"hostRequired": true,
13+
"records": [
14+
{
15+
"type": "CNAME",
16+
"host": "@",
17+
"pointsTo": "cname.appnest.ing",
18+
"ttl": 3600
19+
}
20+
]
21+
}

brhost.az.email.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"providerId": "brhost.az",
3+
"providerName": "BRHost",
4+
"serviceId": "email",
5+
"serviceName": "BRHost Email",
6+
"version": 1,
7+
"logoUrl": "https://brhost.az/brhost-logo.svg",
8+
"description": "BRHost email hosting: MX, SPF, DKIM, DMARC, TLS-RPT and autoconfig records.",
9+
"syncPubKeyDomain": "brhost.az",
10+
"records": [
11+
{ "groupId": "mx", "type": "MX", "host": "@", "pointsTo": "mail.%domain%", "priority": 10, "ttl": 3600 },
12+
{ "groupId": "mail", "type": "A", "host": "mail", "pointsTo": "%ip%", "ttl": 3600 },
13+
{ "groupId": "webmail", "type": "A", "host": "webmail", "pointsTo": "%ip%", "ttl": 3600 },
14+
{ "groupId": "spf", "type": "SPFM", "host": "@", "spfRules": "include:brhost.az", "ttl": 3600 },
15+
{ "groupId": "dkim", "type": "TXT", "host": "mail._domainkey", "data": "%dkim%", "ttl": 3600, "txtConflictMatchingMode": "All" },
16+
{ "groupId": "dmarc", "type": "TXT", "host": "_dmarc", "data": "v=DMARC1; p=quarantine; pct=100; rua=mailto:dmarc@%domain%", "ttl": 3600, "txtConflictMatchingMode": "All", "essential": "OnApply" },
17+
{ "groupId": "tlsrpt", "type": "TXT", "host": "_smtp._tls", "data": "v=TLSRPTv1; rua=mailto:tls-report@%domain%", "ttl": 3600, "txtConflictMatchingMode": "All", "essential": "OnApply" },
18+
{ "groupId": "autodiscover","type": "CNAME", "host": "autodiscover", "pointsTo": "mail.%domain%", "ttl": 3600 },
19+
{ "groupId": "autoconfig", "type": "CNAME", "host": "autoconfig", "pointsTo": "mail.%domain%", "ttl": 3600 }
20+
]
21+
}

0 commit comments

Comments
 (0)