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

Enable close issue as not planned #22032

Merged
merged 4 commits into from
Jun 24, 2022
Merged

Conversation

Abacn
Copy link
Contributor

@Abacn Abacn commented Jun 23, 2022

Fixes #22031

  • Make use of state_reason attribute

  • Run on only issue comment and exclude pull request comment

  • Added documentation

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

* Make use of state_reason attribute

* Run on only issue comment and exclude pull request comment

* Added documentation
@asf-ci
Copy link

asf-ci commented Jun 23, 2022

Can one of the admins verify this patch?

4 similar comments
@asf-ci
Copy link

asf-ci commented Jun 23, 2022

Can one of the admins verify this patch?

@asf-ci
Copy link

asf-ci commented Jun 23, 2022

Can one of the admins verify this patch?

@asf-ci
Copy link

asf-ci commented Jun 23, 2022

Can one of the admins verify this patch?

@asf-ci
Copy link

asf-ci commented Jun 23, 2022

Can one of the admins verify this patch?

@github-actions github-actions bot added the build label Jun 23, 2022
@Abacn
Copy link
Contributor Author

Abacn commented Jun 23, 2022

Should we allow close issue for those only assigned to them? (Currently anyone can use close-issue phrase, and this does not change with this pr)

@Abacn
Copy link
Contributor Author

Abacn commented Jun 23, 2022

Example: Abacn#39

@Abacn
Copy link
Contributor Author

Abacn commented Jun 23, 2022

R: @damccorm

@damccorm
Copy link
Contributor

Should we allow close issue for those only assigned to them? (Currently anyone can use close-issue phrase, and this does not change with this pr)

I think yes for 2 reasons:

  1. Kenn and I created a ton of issues on behalf of other people as part of the migration. Their owners need to be able to close
  2. Anyone can self-assign anyways

@Abacn
Copy link
Contributor Author

Abacn commented Jun 24, 2022

Changes applied.

Comment on lines 38 to 39
ISSUE_ASSIGNEE="$(jq '.issue.assignee.login' $GITHUB_EVENT_PATH | tr -d \")"
if [[ $ISSUE_ASSIGNEE == $LOGIN && $BODY == *"$INPUT_CLOSE"* && $BODY != *"\`$INPUT_CLOSE\`"* ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ISSUE_ASSIGNEE="$(jq '.issue.assignee.login' $GITHUB_EVENT_PATH | tr -d \")"
if [[ $ISSUE_ASSIGNEE == $LOGIN && $BODY == *"$INPUT_CLOSE"* && $BODY != *"\`$INPUT_CLOSE\`"* ]]; then
if [[ $BODY == *"$INPUT_CLOSE"* && $BODY != *"\`$INPUT_CLOSE\`"* ]]; then

I'm sorry, I misspoke (mistyped?) earlier, though my reasoning was still correct. I don't think we should restrict issue close to the assignee. Closing an issue as a non-assignee is probably fairly common (e.g. an owner of a migrated ticket needs to close it), and its not doing anything permissions-wise since anyone can self-assign. I can't think of a scenario where restricting like this helps us.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. adjusted

Copy link
Contributor

@damccorm damccorm left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@damccorm damccorm merged commit e7924d1 into apache:master Jun 24, 2022
@Abacn Abacn deleted the closeIssueNotPlanned branch June 24, 2022 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Enable close issue as not_planned in phrase
3 participants