Skip to content

Commit

Permalink
Fix comment posting from forks (#144)
Browse files Browse the repository at this point in the history
* Fix comment posting from forks

* Rephrase current changelog

* Reformat changelog
  • Loading branch information
mosuem authored Jul 25, 2023
1 parent 27ff3e9 commit 97fc1a7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ name: Health
# uses: dart-lang/ecosystem/.github/workflows/health.yaml@main
# with:
# sdk: beta
# checks: "version changelog license coverage"
# checks: "version,changelog,license,coverage"

on:
workflow_call:
Expand All @@ -43,7 +43,7 @@ on:
required: false
type: string
checks:
description: What to check for in the PR health check - any subset of "version changelog license"
description: What to check for in the PR health check - any subset of "version,changelog,license,coverage"
default: "version,changelog,license,coverage"
type: string
required: false
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
echo ${{ github.event.number }} > current_repo/output/issueNumber
- name: Upload folder with number and markdown
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@65d862660abb392b8c4a3d1195a2108db131dd05
with:
name: output
path: output/
path: current_repo/output/
10 changes: 5 additions & 5 deletions .github/workflows/post_summaries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
run_id: ${{ github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "output"
Expand All @@ -37,7 +37,7 @@ jobs:
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/comment.zip', Buffer.from(download.data));
fs.writeFileSync('${{ github.workspace }}/comment.zip', Buffer.from(download.data));
- run: unzip comment.zip


Expand All @@ -49,9 +49,9 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var markdown = fs.readFileSync('./comment.md');
var markdown = fs.readFileSync('./comment.md', 'utf8');
if (fs.existsSync('./commentId')) {
var comment_number = Number(fs.readFileSync('./commentId'));
var comment_number = Number(fs.readFileSync('./commentId', 'utf8'));
await github.rest.issues.updateComment({
owner: context.repo.owner,
Expand All @@ -61,7 +61,7 @@ jobs:
});
}
else{
var issue_number = Number(fs.readFileSync('./issueNumber'));
var issue_number = Number(fs.readFileSync('./issueNumber', 'utf8'));
await github.rest.issues.createComment({
owner: context.repo.owner,
Expand Down
4 changes: 3 additions & 1 deletion pkgs/firehose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## 0.3.24
- Start fixing [#137](https://github.com/dart-lang/ecosystem/issues/137).

- Fix [#137](https://github.com/dart-lang/ecosystem/issues/137).

## 0.3.23

- Tweak PR health workflow.
- Shorten some text in the markdown summary table.

Expand Down

0 comments on commit 97fc1a7

Please sign in to comment.