-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat(publish): Use craft config from merge target if configured #3451
feat(publish): Use craft config from merge target if configured #3451
Conversation
6f0b910
to
b2335d8
Compare
@asottile-sentry can't request a review due to repo permissions I guess. Would you mind taking a look? thanks! |
@@ -1,9 +1,10 @@ | |||
async function detailsFromContext({ context }) { | |||
if (!context || !context.payload || !context.payload.issue) { | |||
throw new Error('Issue context is not defined'); | |||
throw new Error("Issue context is not defined"); |
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.
formatting change
const titleParser = | ||
/^publish: (?:getsentry\/)?(?<repo>[^/@]+)(?<path>\/[\w./-]+)?@(?<version>[\w.+-]+)$/; |
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.
formatting change
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.
please discard the unrelated formatting changes from your PR so I can review the actual change
const { requester } = context.payload.issue.body.match( | ||
requesterParser | ||
).groups; | ||
const requesterParser = |
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.
formatting change
This should come first for safety. I'd also say (as a next step to the allow list) that it would be better to check whether the branch name is covered by branch protection rules. I think |
Superseded by #3452 |
This PR does 2 things:
merge_target
fromIn a follow up PR, I'll add an allowlist for repos and branches where we can take the config from and fall back if the merge target isn't included in the allowlist.
ref #3441