Skip to content

Commit 835522d

Browse files
authored
Merge pull request #30 from Hubs-Foundation/mozilla-branding-removal
[Mozilla Branding Removal] Removes Mozilla branding
2 parents bd4e24c + 7791df2 commit 835522d

File tree

8 files changed

+18
-19
lines changed

8 files changed

+18
-19
lines changed

.github/workflows/photomnemonic.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ name: photomnemonic
33
on:
44
push:
55
branches:
6-
paths-ignore: ["README.md"]
6+
paths-ignore: ["README.md", "LICENSE"]
77
workflow_dispatch:
88
env:
99
containerName: photomnemonic
1010

1111
jobs:
1212
turkeyGitops:
13-
uses: mozilla/hubs-ops/.github/workflows/turkeyGitops.yml@master
13+
uses: Hubs-Foundation/hubs-ops/.github/workflows/turkeyGitops.yml@master
1414
with:
15-
registry: mozillareality
15+
registry: hubsfoundation
1616
push_gcr: true
1717
# dockerfile: Dockerfile
1818
secrets:
1919
DOCKER_HUB_PWD: ${{ secrets.DOCKER_HUB_PWD }}
20-
GCP_TURKEYGITOPS_SA_JSON: ${{ secrets.GCP_TURKEYGITOPS_SA_JSON }}
20+
GCP_TURKEYGITOPS_SA_JSON: ${{ secrets.GCP_TURKEYGITOPS_SA_JSON }}

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# FROM node:lts-alpine
2-
FROM node:lts-buster
1+
FROM node:lts-bullseye
32
WORKDIR /app
43

54
RUN apt-get update && apt-get -y install libnss3 libexpat1
@@ -11,4 +10,4 @@ RUN npm install express
1110

1211
COPY app.js index.js utils.js /app/
1312
# user nobody
14-
CMD AWS_LAMBDA_FUNCTION_NAME="turkey" node app.js
13+
CMD AWS_LAMBDA_FUNCTION_NAME="turkey" node app.js

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
AWS Lambda function for taking screenshots of the web
1+
A Node.js Express server for taking screenshots of the web.
2+
(Originally an AWS Lambda function)

index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ async function screenshot(url) {
3636
}
3737
catch (e){
3838
console.log(e)
39-
}
40-
await sleep(500)
39+
}
40+
await sleep(500)
4141
}
4242

4343
console.log("Error failed to produce screenshot")
@@ -50,8 +50,7 @@ module.exports.handler = async function handler(event, context, callback) {
5050
t0 = new Date().getTime()
5151

5252
const queryStringParameters = event.queryStringParameters || {};
53-
const { url = "https://www.mozilla.org"} =
54-
queryStringParameters;
53+
const { url = "https://hubsfoundation.org/" } = queryStringParameters;
5554

5655
if (!(await urlAllowed(url))) {
5756
return callback(null, { statusCode: 403, body: "forbidden" });
@@ -66,7 +65,7 @@ module.exports.handler = async function handler(event, context, callback) {
6665
try {
6766
const result = await screenshot(url);
6867
// console.log( "screenshot(url) took: ", new Date().getTime()-t0, "ms")
69-
68+
7069
data = result.data;
7170
console.log( "data.length: ", data.length)
7271

polycosm-publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fi
1212
if [[ -z "$HUBS_OPS_PATH" ]]; then
1313
echo -e "To use this deploy script, you need to clone out the hubs-ops repo
1414
15-
git clone git@github.com:mozilla/hubs-ops.git
15+
git clone https://github.com/Hubs-Foundation/hubs-ops.git
1616
1717
Then set HUBS_OPS_PATH to point to the cloned repo."
1818
exit 1

run-serverless.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
if [[ -z "$HUBS_OPS_PATH" ]]; then
1818
echo -e "To use this deploy script, you need to clone out the hubs-ops repo
1919
20-
git clone git@github.com:mozilla/hubs-ops.git
20+
git clone https://github.com/Hubs-Foundation/hubs-ops.git
2121
2222
Then set HUBS_OPS_PATH to point to the cloned repo."
2323
exit 1

template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Description: >
66
Metadata:
77
AWS::ServerlessRepo::Application:
88
Name: photomnemonic
9-
Description: Site screenshotter for Hubs Cloud
10-
Author: Mozilla
9+
Description: Site screenshotter for Hubs
10+
Author: Mozilla (Original Author), Hubs Foundation (Current Maintainer)
1111
SpdxLicenseId: MPL-2.0
1212
LicenseUrl: LICENSE
1313
ReadmeUrl: README.md
1414
SemanticVersion: 0.2.0
15-
SourceCodeUrl: https://github.com/mozilla/photomnemonic
15+
SourceCodeUrl: https://github.com/Hubs-Foundation/photomnemonic
1616

1717
Parameters:
1818
PhotomnemonicRoleArn:

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const test = require("ava");
2-
const { urlAllowed } = require("./url-utils");
2+
const { urlAllowed } = require("./utils");
33

44
test("should disallow invalid and internal urls", async t => {
55
t.false(await urlAllowed("invalid url"));

0 commit comments

Comments
 (0)