-
-
Notifications
You must be signed in to change notification settings - Fork 10
docs(claude): add workflow rules #3293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f8bf9ca
2803e5f
009023b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,40 +32,48 @@ const page = async (name) => { | |
| * @return {Promise} All versions | ||
| */ | ||
| const releases = async () => { | ||
| const requests = config.repos.map((item) => | ||
| axios.get(`https://api.github.com/repos/${item.owner}/${item.repo}/releases`, { | ||
| headers: item.token ? { Authorization: `token ${item.token}` } : {}, | ||
| }), | ||
| ); | ||
| let results = await axios.all(requests); | ||
| results = results.map((result, i) => ({ | ||
| title: config.repos[i].title, | ||
| list: result.data.map((release) => ({ | ||
| name: release.name, | ||
| prerelease: release.prerelease, | ||
| published_at: release.published_at, | ||
| })), | ||
| })); | ||
| return Promise.resolve(results); | ||
| try { | ||
| const requests = config.repos.map((item) => | ||
| axios.get(`https://api.github.com/repos/${item.owner}/${item.repo}/releases`, { | ||
| headers: item.token ? { Authorization: `token ${item.token}` } : {}, | ||
| }), | ||
| ); | ||
| let results = await axios.all(requests); | ||
| results = results.map((result, i) => ({ | ||
| title: config.repos[i].title, | ||
| list: result.data.map((release) => ({ | ||
| name: release.name, | ||
| prerelease: release.prerelease, | ||
| published_at: release.published_at, | ||
| })), | ||
| })); | ||
| return results; | ||
| } catch (_err) { | ||
| return []; | ||
| } | ||
|
Comment on lines
+35
to
+53
|
||
| }; | ||
|
|
||
| /** | ||
| * @desc Function to get all changelogs | ||
| * @return {Promise} All changelogs | ||
| */ | ||
| const changelogs = async () => { | ||
| const repos = _.filter(config.repos, (repo) => repo.changelog); | ||
| const requests = repos.map((item) => | ||
| axios.get(`https://api.github.com/repos/${item.owner}/${item.repo}/contents/${item.changelog}`, { | ||
| headers: item.token ? { Authorization: `token ${item.token}` } : {}, | ||
| }), | ||
| ); | ||
| let results = await axios.all(requests); | ||
| results = results.map((result, i) => ({ | ||
| title: config.repos[i].title, | ||
| markdown: Base64.decode(result.data.content), | ||
| })); | ||
| return Promise.resolve(results); | ||
| try { | ||
| const repos = _.filter(config.repos, (repo) => repo.changelog); | ||
| const requests = repos.map((item) => | ||
| axios.get(`https://api.github.com/repos/${item.owner}/${item.repo}/contents/${item.changelog}`, { | ||
| headers: item.token ? { Authorization: `token ${item.token}` } : {}, | ||
| }), | ||
| ); | ||
| let results = await axios.all(requests); | ||
| results = results.map((result, i) => ({ | ||
| title: repos[i].title, | ||
| markdown: Base64.decode(result.data.content), | ||
| })); | ||
| return results; | ||
| } catch (_err) { | ||
| return []; | ||
| } | ||
|
Comment on lines
+61
to
+76
|
||
| }; | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR title/description indicate a docs-only change to CLAUDE workflow rules, but this PR also changes runtime behavior and integration tests for the Home GitHub endpoints. Please either split the Home service/test changes into a separate PR or update the PR title/description to reflect the code behavior change.