Skip to content

Commit acb6b17

Browse files
committed
fix: Fixing gopls workflow
1 parent a45b493 commit acb6b17

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

.github/scripts/gopls/create-issue.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ const fs = require('fs');
77
* @param {Object} params.context - GitHub Actions context
88
* @param {Object} params.core - GitHub Actions core utilities
99
* @param {string} params.fixedFilesPath - Path to the fixed files list
10-
* @param {string} params.outputFilePath - Path to the gopls output file
1110
* @returns {Promise<number>} The created issue number
1211
*/
13-
module.exports = async ({ github, context, core, fixedFilesPath, outputFilePath }) => {
12+
module.exports = async ({ github, context, core, fixedFilesPath }) => {
1413
try {
1514
// Read the files that were fixed from provided paths
1615
const fixedFiles = fs.readFileSync(fixedFilesPath, 'utf8');
17-
const goplsOutput = fs.readFileSync(outputFilePath, 'utf8');
1816

1917
const issueBody = `## Gopls Quickfix Issues Found
2018
@@ -31,16 +29,6 @@ ${fixedFiles}
3129
3230
### Next Steps
3331
A pull request will be created to address these issues automatically.
34-
35-
### Full Output
36-
<details>
37-
<summary>Click to expand gopls output</summary>
38-
39-
\`\`\`
40-
${goplsOutput}
41-
\`\`\`
42-
43-
</details>
4432
`;
4533

4634
const issue = await github.rest.issues.create({

.github/workflows/gopls.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ jobs:
5454
uses: actions/github-script@v7
5555
env:
5656
FIXED_FILES_PATH: ${{ steps.gopls_run.outputs.fixed_files_path }}
57-
OUTPUT_FILE_PATH: ${{ steps.gopls_run.outputs.output_file_path }}
5857
with:
5958
script: |
6059
const createIssue = require('./.github/scripts/gopls/create-issue.js');
6160
const fixedFilesPath = process.env.FIXED_FILES_PATH;
62-
const outputFilePath = process.env.OUTPUT_FILE_PATH;
63-
await createIssue({ github, context, core, fixedFilesPath, outputFilePath });
61+
await createIssue({ github, context, core, fixedFilesPath });
6462
6563
- name: Create pull request for fixes
6664
if: steps.check-changes.outputs.has_changes == 'true'

0 commit comments

Comments
 (0)