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

fix: pkg.pr.new comment workflow #14156

Merged
merged 3 commits into from
Nov 5, 2024
Merged
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
7 changes: 4 additions & 3 deletions .github/workflows/pkg.pr.new-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: output.json
path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- run: ls -R .
- name: 'Post or update comment'
uses: actions/github-script@v6
with:
Expand Down Expand Up @@ -85,8 +86,8 @@ jobs:
}

if (output.event_name === 'pull_request') {
if (context.issue.number) {
await create_or_update_comment(context.issue.number);
if (output.number) {
await create_or_update_comment(output.number);
}
} else if (output.event_name === 'push') {
const pull_requests = await github.rest.pulls.list({
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pkg.pr.new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: output.json
path: output.json
path: ./output
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just saw this. I'm pretty sure this needs to be the path to the file you want to save, I don't think this will actually save the JSON file

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name is just a reference, it can be anything, more like an id. Path is the thing that determines what gets saved.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


- run: ls -R .
Loading