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(ci): make upload artifacts job edit the comment #2054

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
41 changes: 30 additions & 11 deletions .github/workflows/upload_artifacts_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,39 @@ jobs:
echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV
echo "WORKFLOW_LINK=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_ENV

- name: Add a comment to the PR
# Comment with a link to the workflow (or update existing comment on rerun).
# Required, as this is a triggered workflow, and does not appear on the PR status page.
- name: Find Comment
if: env.PR_NUMBER != ''
uses: actions/github-script@v6
uses: peter-evans/find-comment@v1
id: fc
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const workflowLink = process.env.WORKFLOW_LINK;
github.rest.issues.createComment({
issue_number: process.env.PR_NUMBER,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Artifacts upload triggered. [View details here](${workflowLink})`
})
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ env.PR_NUMBER }}
comment-author: 'github-actions[bot]'
body-includes: Artifacts upload workflows

- name: Create comment
if: env.PR_NUMBER != '' && steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ env.PR_NUMBER }}
body: |
Artifacts upload workflows:
* [${{ github.event.repository.updated_at }}](${{ env.WORKFLOW_LINK }})

- name: Update comment
if: env.PR_NUMBER != '' && steps.fc.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: append
body: |
* [${{ github.event.repository.updated_at }}](${{ env.WORKFLOW_LINK }})

# Build artifact.
- uses: ./.github/actions/bootstrap
- name: Build native blockifier
run: ./build_native_in_docker.sh scripts/build_native_blockifier.sh
Expand Down
1 change: 1 addition & 0 deletions crates/blockifier/src/test_utils/struct_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ impl BlockContext {
}
}

// tmp
Copy link

Choose a reason for hiding this comment

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

This comment // tmp appears to be unrelated to the CI changes in this PR and was likely committed accidentally. Please remove it in a separate commit or PR.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

impl CallExecution {
pub fn from_retdata(retdata: Retdata) -> Self {
Self { retdata, ..Default::default() }
Expand Down
Loading