-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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): change ephemeral env to use github labels instead of comments #31340
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2fe2b5d
fix(ci): ephemeral get SHA
dpgaspar 6921188
Merge branch 'master' into fix/ephemeral-get-sha
dpgaspar 8a8a328
use labels instead, address comments
dpgaspar c147df4
use labels instead, address comments
dpgaspar 90032a0
fixes
dpgaspar ecd1182
fix
dpgaspar f7971b9
fix
dpgaspar 8bc902f
fix
dpgaspar f922c4e
remove unused step to get PR info
dpgaspar 447794d
fix name
dpgaspar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should exit early if the PR was updated after the comment. See https://github.com/apache/camel/blob/66fbdcd2c71a6588bacd7b3e0d2a03128c0cd069/.github/workflows/pr-comment.yml#L55-L57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this is not useful as
pushed_at
field is deprecated and the value will be nil.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any evidence of that in the documentation. Can you point me to your source?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was deprecated last year: https://docs.github.com/en/graphql/overview/breaking-changes#changes-scheduled-for-2023-07-01
see also: https://github.com/orgs/community/discussions/24730#discussioncomment-3245265
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks! In that case, alternative methods to verify the time of
commitpush should be used. (But some sort of verification is still needed)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If untrusted code needs to be run, I would move the IssueOps workflow to a Label gate (pull_request + label). There is no way to get a trustful commit date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to tie things together:
pushed_at
from https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request is slightly different fromCommit.pushedDate
, but I suppose the they're ultimately populated from the same source, so both are deprecated/going away? This wasn't obvious to me before but would make sense. I didn't see anything in https://docs.github.com/en/rest/about-the-rest-api/breaking-changes but I guess it just somewhat follows from https://docs.github.com/en/graphql/overview/breaking-changes .There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pwntester @raboof sorry for the delay here. I've updated to workflow to use PR labels, would be great if you can review it again