Skip to content
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

feat: create issue when Flat step fails #27

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/flat-error-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Flat Data Error – {{ env.NAME }}
---

Error fetching data from the following endpoint: {{ env.URL }}.
846 changes: 363 additions & 483 deletions .github/workflows/flat.yml

Large diffs are not rendered by default.

Binary file modified data/RD_Percentage_GDP.xlsx
Binary file not shown.
Binary file modified data/population_density.xlsx
Binary file not shown.
Binary file modified data/population_electricity_coverage.xlsx
Binary file not shown.
12 changes: 11 additions & 1 deletion process_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ const manifest = await readCSV(inputFilename);

const steps = manifest.map(
({ name, format, endpoint }) => `
- name: Fetch data
- name: Fetch data (${name})
uses: githubocto/flat@v2
if: always()
with:
http_url: ${endpoint}
downloaded_filename: data/${name}.${format}
postprocess: ./process_raw_data.js
- name: Create issue (${name})
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
URL: "${endpoint}"
NAME: "${name}"
GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}\
with:
filename: .github/flat-error-template.md
update_existing: true
`
);

Expand Down
372 changes: 186 additions & 186 deletions processed/RD_Percentage_GDP.csv

Large diffs are not rendered by default.

528 changes: 264 additions & 264 deletions processed/population_density.csv

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions processed/population_electricity_coverage.csv

Large diffs are not rendered by default.