Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update codeql.yml to automatically create new CodeQL issues (#6503)
* Create Check for CodeQL alerts step in codeql.yml * Make create-codeql-issue folder with issue-body.md file * Change branch name for testing * Change branch back to gh-pages and token secrets back to GITHUB_TOKEN * Fix issueBodyTemplatePath * Move create-codeql-issues folder into trigger-issue folder * Comment out error message for createIssueResponse * Refactor codeql.yml and move scripts to separate js files * Create fetch-alerts.js * Create check-existing-issues.js * Create create-new-issues.js * Replace branch and token for testing * Move secrets to codeql.yml and pass as argument to functions * Require core in fetch-alerts.js and check-existing-issues.js * Remove require core and pass as argument to js files * Swap core with setOutput * Remove require core * Remove core from setOutput invocation * Add comma * Require in core and remove from arguments * Remove core require * Remove return statements * Add console log for testing * Add more console logs for testing * Add env to yml steps and use process.env in token * Require in core * Add Set up Node.js step to enable core * Add step to install actions/core module * Declare alerts and alertId in yml file * Add comma to headers in POST request * Replace TEAMS with H4LA_TOKEN * Update node version * Revert H4LA_TOKEN to TEAMS * Revert H4LA_TOKEN to GITHUB_TOKEN * Remove console logs * Update codeql.yml file * Update fetch-alerts.js file * Update check-existing-issues.js file * Update create-new-issues.js file * Replace missing curly braces * Replace response with fetchAlertsResponse * Replace listAlertsForRepo with GET request * Replace ok with 200 * Add comments and console log for testing * Remove .json() * Replace ok with 200 * Update comments and POST request syntax * Replace ok with 200 on create-new-issues.js and change POST to GET on check-existing-issues.js * Replace .json() with .data * Update POST request syntax * Update comments and change secrets * Revert secret name * Add comments * Batch API requests to avoid hitting rate limit * Add comments * Adjust alertIdsWithoutIssues.push logic * Add console logs * Reduce batches from 10 to 5 due to GitHub limit * Adjust createIssueResponse query * Add comment * Add template literals to query url and add comment for testing * Change 200 to 201 * Update comment * Batch issue creation requests to avoid rate limit * Adjust batching of new issue requests * Revert changes * Remove comment * Move console log * Update console log * Update console log * Update console log * Replaced test branch with gh-pages * Update console logs and comments * Removed fs and updated issueTitle * Removed fs * Add fs back in * Remove fs * Add HACKFORLA_ADMIN_TOKEN in fetch-alerts secret * Revert secret back to HACKFORLA_BOT_PA_TOKEN * Swap bot token for GITHUB_TOKEN * Replace GITHUB_TOKEN with HACKFORLA_BOT_PA_TOKEN on Create New Issues step * Revert token on Create New Issues * Add How to manage CodeQL alerts to issue template * Add workflow_dispatch for manual retries * Update put request to use create function * Refactor body variable * Change token * Changed GITHUB_TOKEN to HACKFORLA_ADMIN_TOKEN * Add issues: write to permissions * Change permissions to write-all * Move permissions up above jobs * Move permissions back to original location * Updated branch to test * Change token and branch * Change branch back to gh-pages * Change branch to test * Change branch back to gh-pages * Add if statement to new yml steps * Change branch for testing * Change branch back to gh-pages * Add create-new-issues id and reorder id and if conditions to be consistent * Change branch to test * Added unused variable to see if CodeQL picks it up * Changed branch to gh-pages * Removed unused variable
- Loading branch information