Conversation
ydshieh
commented
Aug 1, 2025
Comment on lines
-19
to
-39
| # We only need to verify the timestamp if the workflow is triggered by `issue_comment`. | ||
| verity_pr_commit: | ||
| name: Verity PR commit corresponds to a specific event by comparing timestamps | ||
| if: ${{ github.event.comment.created_at != '' }} | ||
| runs-on: ubuntu-22.04 | ||
| needs: get-pr-info | ||
| env: | ||
| COMMENT_DATE: ${{ github.event.comment.created_at }} | ||
| PR_MERGE_COMMIT_DATE: ${{ needs.get-pr-info.outputs.PR_MERGE_COMMIT_DATE }} | ||
| PR_MERGE_COMMIT_TIMESTAMP: ${{ needs.get-pr-info.outputs.PR_MERGE_COMMIT_TIMESTAMP }} | ||
| steps: | ||
| - run: | | ||
| COMMENT_TIMESTAMP=$(date -d "${COMMENT_DATE}" +"%s") | ||
| echo "COMMENT_DATE: $COMMENT_DATE" | ||
| echo "PR_MERGE_COMMIT_DATE: $PR_MERGE_COMMIT_DATE" | ||
| echo "COMMENT_TIMESTAMP: $COMMENT_TIMESTAMP" | ||
| echo "PR_MERGE_COMMIT_TIMESTAMP: $PR_MERGE_COMMIT_TIMESTAMP" | ||
| if [ $COMMENT_TIMESTAMP -le $PR_MERGE_COMMIT_TIMESTAMP ]; then | ||
| echo "Last commit on the pull request is newer than the issue comment triggering this run! Abort!"; | ||
| exit -1; | ||
| fi |
Collaborator
Author
There was a problem hiding this comment.
this workflow is only triggered via
on:
pull_request_target:
types: [opened, synchronize, reopened]
not via comment
Collaborator
Author
There was a problem hiding this comment.
(i added it for some experimentation)
ydshieh
commented
Aug 1, 2025
Comment on lines
+25
to
+44
| verity_pr_commit: | ||
| name: Verity PR commit corresponds to a specific event by comparing timestamps | ||
| if: ${{ needs.get-pr-number.outputs.PR_NUMBER != ''}} | ||
| runs-on: ubuntu-22.04 | ||
| needs: get-pr-info | ||
| env: | ||
| COMMENT_DATE: ${{ github.event.comment.created_at }} | ||
| PR_MERGE_COMMIT_DATE: ${{ needs.get-pr-info.outputs.PR_MERGE_COMMIT_DATE }} | ||
| PR_MERGE_COMMIT_TIMESTAMP: ${{ needs.get-pr-info.outputs.PR_MERGE_COMMIT_TIMESTAMP }} | ||
| steps: | ||
| - run: | | ||
| COMMENT_TIMESTAMP=$(date -d "${COMMENT_DATE}" +"%s") | ||
| echo "COMMENT_DATE: $COMMENT_DATE" | ||
| echo "PR_MERGE_COMMIT_DATE: $PR_MERGE_COMMIT_DATE" | ||
| echo "COMMENT_TIMESTAMP: $COMMENT_TIMESTAMP" | ||
| echo "PR_MERGE_COMMIT_TIMESTAMP: $PR_MERGE_COMMIT_TIMESTAMP" | ||
| if [ $COMMENT_TIMESTAMP -le $PR_MERGE_COMMIT_TIMESTAMP ]; then | ||
| echo "Last commit on the pull request is newer than the issue comment triggering this run! Abort!"; | ||
| exit -1; | ||
| fi |
Collaborator
Author
There was a problem hiding this comment.
important to have this check when the workflow file is triggered via comment
ydshieh
commented
Aug 1, 2025
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
gante
approved these changes
Aug 1, 2025
Contributor
gante
left a comment
There was a problem hiding this comment.
🙌
If I got it right, comments with build-doc will trigger the full doc build, correct?
Collaborator
Author
Yes :-) |
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
zaristei
pushed a commit
to zaristei/transformers
that referenced
this pull request
Sep 9, 2025
* try * try * try * try * try --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
As discussed offline with @gante