Skip to content

Commit bca192a

Browse files
committed
initial commit
1 parent fbe8a7f commit bca192a

File tree

25 files changed

+1135
-98
lines changed

25 files changed

+1135
-98
lines changed

.gitignore

Lines changed: 0 additions & 61 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## [project-title] Changelog
1+
## durablefunctions-apiscraping-nodejs Changelog
22

33
<a name="x.y.z"></a>
44
# x.y.z (yyyy-mm-dd)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to [project-title]
1+
# Contributing to durablefunctions-apiscraping-nodejs
22

33
This project welcomes contributions and suggestions. Most contributions require you to agree to a
44
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us

FanOutFanInCrawler/.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
bin
2+
obj
3+
csx
4+
.vs
5+
edge
6+
Publish
7+
8+
*.user
9+
*.suo
10+
*.cscfg
11+
*.Cache
12+
project.lock.json
13+
14+
/packages
15+
/TestResults
16+
17+
/tools/NuGet.exe
18+
/App_Data
19+
/secrets
20+
/data
21+
.secrets
22+
appsettings.json
23+
local.settings.json
24+
25+
node_modules
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions"
4+
]
5+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to JavaScript Functions",
6+
"type": "node",
7+
"request": "attach",
8+
"port": 5858,
9+
"protocol": "inspector",
10+
"preLaunchTask": "runFunctionsHost"
11+
}
12+
]
13+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"azureFunctions.projectRuntime": "beta",
3+
"azureFunctions.projectLanguage": "JavaScript",
4+
"azureFunctions.templateFilter": "Verified"
5+
}

FanOutFanInCrawler/.vscode/tasks.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Run Functions Host",
6+
"identifier": "runFunctionsHost",
7+
"type": "shell",
8+
"command": "func host start",
9+
"options": {
10+
"env": {
11+
"languageWorkers:node:arguments": "--inspect=5858"
12+
}
13+
},
14+
"isBackground": true,
15+
"presentation": {
16+
"reveal": "always"
17+
},
18+
"problemMatcher": [
19+
{
20+
"owner": "azureFunctions",
21+
"pattern": [
22+
{
23+
"regexp": "\\b\\B",
24+
"file": 1,
25+
"location": 2,
26+
"message": 3
27+
}
28+
],
29+
"background": {
30+
"activeOnStart": true,
31+
"beginsPattern": "^.*Stopping host.*",
32+
"endsPattern": "^.*Job host started.*"
33+
}
34+
}
35+
]
36+
}
37+
]
38+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"bindings": [{
3+
"name": "input",
4+
"type": "activityTrigger",
5+
"direction": "in"
6+
}],
7+
"disabled": false
8+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const octokit = require('@octokit/rest')({
2+
headers: {
3+
'user-agent': 'FanOutFanInCrawler'
4+
}
5+
});
6+
octokit.authenticate({
7+
type: 'token',
8+
token: process.env["GitHubToken"]
9+
});
10+
11+
module.exports = async function (context, input) {
12+
// retrieves the organization name from the Orchestrator function
13+
var organizationName = input;
14+
15+
var finalResult = [];
16+
let page = 1;
17+
do {
18+
// invoke the API to retrieve the list of repositories of a specific organization
19+
var result = await octokit.repos.getForOrg({
20+
org: organizationName,
21+
type: "public",
22+
page: page
23+
});
24+
page++;
25+
// merge the paged results inside a single array
26+
finalResult = finalResult.concat(result.data);
27+
}
28+
while (result.data.length !== 0)
29+
return finalResult;
30+
};

0 commit comments

Comments
 (0)