|
| 1 | +name: Download and Merge Bugzilla Data |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '00 00 * * *' # Runs every day at 12:00AM (midnight) |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + download-and-merge-bugzilla-data: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - name: Checkout repository |
| 14 | + uses: actions/checkout@v3 |
| 15 | + with: |
| 16 | + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} |
| 17 | + |
| 18 | + - name: Download Bugzilla data (medium impact) |
| 19 | + run: | |
| 20 | + curl -o bugzilla-data-medium.json "https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status,component,creation_time,last_change_time,keywords,priority,severity,op_sys&bug_status=__open__&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&f1=cf_performance_impact&limit=0&o1=equals&v1=medium" |
| 21 | +
|
| 22 | + - name: Download Bugzilla data (low impact) |
| 23 | + run: | |
| 24 | + curl -o bugzilla-data-low.json "https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status,component,creation_time,last_change_time,keywords,priority,severity,op_sys&bug_status=__open__&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&f1=cf_performance_impact&limit=0&o1=equals&v1=low" |
| 25 | +
|
| 26 | + - name: Download Bugzilla data (high impact) |
| 27 | + run: | |
| 28 | + curl -o bugzilla-data-high.json "https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status,component,creation_time,last_change_time,keywords,priority,severity,op_sys&bug_status=__open__&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&f1=cf_performance_impact&limit=0&o1=equals&v1=high" |
| 29 | +
|
| 30 | + - name: Download Bugzilla data (untriaged) |
| 31 | + run: | |
| 32 | + curl -o bugzilla-data-untriaged.json "https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status,component,creation_time,last_change_time,keywords,priority,severity,op_sys&f1=OP&f10=OP&f11=cf_performance_impact&f12=flagtypes.name&f13=CP&f2=cf_performance_impact&f3=CP&f4=OP&f5=product&f6=component&f7=keywords&f8=cf_performance_impact&f9=CP&j_top=OR&o11=equals&o12=notsubstring&o2=equals&o5=equals&o6=equals&o7=notsubstring&o8=isempty&resolution=---&v11=pending-needinfo&v12=needinfo&v2=%3F&v5=Core&v6=Performance&v7=meta" |
| 33 | +
|
| 34 | + - name: Download Bugzilla data (needinfo) |
| 35 | + run: | |
| 36 | + curl -o bugzilla-data-needinfo.json "https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status,component,creation_time,last_change_time,keywords,priority,severity,op_sys&bug_status=__open__&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&f1=cf_performance_impact&limit=0&o1=equals&v1=pending-needinfo" |
| 37 | +
|
| 38 | + - name: Download Bugzilla data (regressions) |
| 39 | + run: | |
| 40 | + curl -o bugzilla-data-regressions.json "https://bugzilla.mozilla.org/rest/bug?include_fields=id,summary,status,component,creation_time,last_change_time,keywords,priority,severity,op_sys&classification=Client%20Software&classification=Developer%20Infrastructure&classification=Components&classification=Server%20Software&classification=Other&f1=keywords&f2=keywords&o1=substring&o2=anywordssubstr&resolution=---&v1=regression&v2=perf-alert" |
| 41 | +
|
| 42 | +
|
| 43 | + - name: Merge JSON files |
| 44 | + run: | |
| 45 | + jq -n '{high: $high[], medium: $medium[], low: $low[], untriaged: $untriaged[], needinfo: $needinfo[], regressions: $regressions[]}' \ |
| 46 | + --slurpfile high bugzilla-data-high.json \ |
| 47 | + --slurpfile medium bugzilla-data-medium.json \ |
| 48 | + --slurpfile low bugzilla-data-low.json \ |
| 49 | + --slurpfile untriaged bugzilla-data-untriaged.json \ |
| 50 | + --slurpfile needinfo bugzilla-data-needinfo.json \ |
| 51 | + --slurpfile regressions bugzilla-data-regressions.json > bugzilla-data-all.json |
| 52 | +
|
| 53 | + - name: Commit and push changes |
| 54 | + run: | |
| 55 | + git config --global user.name 'github-actions[bot]' |
| 56 | + git config --global user.email 'github-actions[bot]@users.noreply.github.com' |
| 57 | + git add bugzilla-data-medium.json bugzilla-data-low.json bugzilla-data-high.json bugzilla-data-untriaged.json bugzilla-data-needinfo.json bugzilla-data-all.json bugzilla-data-regressions.json |
| 58 | + git commit -m "Update Bugzilla data" |
| 59 | + git push |
0 commit comments