https://github.com/apple/swift
1.0 sResult
- Summary
- swiftlang/swift currently has 70,487 GitHub stars.
- Repository
- swiftlang/swift
- Star count
- 70487
Input
- Repository url
- https://github.com/apple/swift
Get the current star count for a public GitHub repository.
Osaurus asks for these each time it runs.
Enter the full URL of a public GitHub repository, such as https://github.com/apple/swift.
Use GitHub's public API to retrieve the repository name and current stargazer count.
What it hands back when it's done.
Generated by the Store from the shared file. Review access again in Osaurus before adding. How listings are checked
See access in detailEvery step in the order it runs. Select one in the graph for a quick look; the full details, including any code, follow below it.
Use GitHub's public API to retrieve the repository name and current stargazer count.
Network: api.github.com · Times out after 30s
async function run(input, ctx) {
const raw = String(input.repository_url || '').trim();
const match = raw.match(/^https:\/\/(?:www\.)?github\.com\/([^\/?#]+)\/([^\/?#]+?)(?:\.git)?\/?(?:[?#].*)?$/i);
if (!match) throw new Error('Enter a full public repository URL such as https://github.com/apple/swift.');
const owner = match[1];
const repo = match[2];
const response = await ctx.fetch(`https://api.github.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`, {
headers: { 'Accept': 'application/vnd.github+json', 'X-GitHub-Api-Version': '2022-11-28', 'User-Agent': 'Osaurus-GitHub-Star-Stats' }
});
if (response.status === 404) throw new Error('Repository not found. Check that it exists and is public.');
if (response.status === 403) throw new Error('GitHub API rate limit reached. Please try again later.');
if (!response.ok) throw new Error(`GitHub API request failed with status ${response.status}.`);
const data = await response.json();
const repository = data.full_name;
const star_count = data.stargazers_count;
return {
repository,
star_count,
summary: `${repository} currently has ${star_count.toLocaleString('en-US')} GitHub star${star_count === 1 ? '' : 's'}.`
};
}{
"repository_url": "{{input.repository_url}}"
}Enter the full URL of a public GitHub repository, such as https://github.com/apple/swift.
Returns
summary
repository
star_count
Included in the file by the author.
{
"repository_url": "https://github.com/apple/swift"
}Read from the steps, not only from what the author declared.
Signed by author. The signature matches the publisher's key. It does not guarantee that the listing is safe. Only the same key can publish new versions of this workflow.
0xc820da3Ce55C600A6282D2B21083Fe5Aa7E51F3DThe exact file Osaurus imports. Its hash and signature were checked on upload.
sha256:a989a8206938f15e47bbb46f9211136e62b4e4f5bc55ec4de72fc5ecdaecc1d2{
"id": "F2E31009-6379-45E3-A7D9-2038F4766114",
"kind": "workflow",
"name": "GitHub Star Stats",
"author": {
"address": "0xc820da3Ce55C600A6282D2B21083Fe5Aa7E51F3D",
"signature": "74919ad759a2184c7b45190cc1645afbc97929b36f164ee48d4934842865f41036cdace8df1918388824bb2c3864dd58cb3e2afaa8797a8cf4c0302971ae92c71b"
},
"format": "osaurus.template",
"summary": "Get the current star count for a public GitHub repository.",
"version": 1,
"workflow": {
"edges": [],
"nodes": [
{
"id": "fetch_stars",
"code": {
"source": "async function run(input, ctx) {\n const raw = String(input.repository_url || '').trim();\n const match = raw.match(/^https:\\/\\/(?:www\\.)?github\\.com\\/([^\\/?#]+)\\/([^\\/?#]+?)(?:\\.git)?\\/?(?:[?#].*)?$/i);\n if (!match) throw new Error('Enter a full public repository URL such as https://github.com/apple/swift.');\n const owner = match[1];\n const repo = match[2];\n const response = await ctx.fetch(`https://api.github.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}`, {\n headers: { 'Accept': 'application/vnd.github+json', 'X-GitHub-Api-Version': '2022-11-28', 'User-Agent': 'Osaurus-GitHub-Star-Stats' }\n });\n if (response.status === 404) throw new Error('Repository not found. Check that it exists and is public.');\n if (response.status === 403) throw new Error('GitHub API rate limit reached. Please try again later.');\n if (!response.ok) throw new Error(`GitHub API request failed with status ${response.status}.`);\n const data = await response.json();\n const repository = data.full_name;\n const star_count = data.stargazers_count;\n return {\n repository,\n star_count,\n summary: `${repository} currently has ${star_count.toLocaleString('en-US')} GitHub star${star_count === 1 ? '' : 's'}.`\n };\n}",
"network": [
"api.github.com"
],
"secrets": [],
"timeout": 30,
"memory_limit_mb": 64
},
"kind": "code",
"name": "Fetch GitHub stars",
"input": {
"repository_url": "{{input.repository_url}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"intent": "Use GitHub's public API to retrieve the repository name and current stargazer count.",
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"repository",
"star_count",
"summary"
],
"properties": {
"summary": {
"type": "string"
},
"repository": {
"type": "string"
},
"star_count": {
"type": "integer"
}
},
"additionalProperties": false
}
}
],
"output": {
"summary": "{{nodes.fetch_stars.output.summary}}",
"repository": "{{nodes.fetch_stars.output.repository}}",
"star_count": "{{nodes.fetch_stars.output.star_count}}"
},
"secrets": [],
"examples": [
{
"name": "Apple Swift repository",
"input": {
"repository_url": "https://github.com/apple/swift"
}
}
],
"model_slots": [],
"input_schema": {
"type": "object",
"x-order": [
"repository_url"
],
"required": [
"repository_url"
],
"properties": {
"repository_url": {
"type": "string",
"title": "Repository URL",
"description": "Enter the full URL of a public GitHub repository, such as https://github.com/apple/swift."
}
},
"additionalProperties": false
},
"output_schema": {
"type": "object",
"required": [
"repository",
"star_count",
"summary"
],
"properties": {
"summary": {
"type": "string",
"title": "Summary"
},
"repository": {
"type": "string",
"title": "Repository"
},
"star_count": {
"type": "integer",
"title": "Stars"
}
},
"additionalProperties": false
},
"requirement_notes": {}
},
"changelog": "Created a tested workflow that accepts a public GitHub repository URL and returns its current star count with an on-screen summary.",
"created_at": "2026-10-07T21:55:19Z",
"content_hash": "sha256:a989a8206938f15e47bbb46f9211136e62b4e4f5bc55ec4de72fc5ecdaecc1d2",
"requirements": {
"notes": {},
"models": [],
"network": [
"api.github.com"
],
"plugins": [],
"secrets": [],
"knowledge": [],
"mcp_servers": [],
"permissions": []
},
"format_version": 1,
"available_to_orchestrator": true
}1 version, newest first.