8000 Enable take comments to assign issues to users by timsaucer · Pull Request #1058 · apache/datafusion-python · GitHub
[go: up one dir, main page]

Skip to content

Enable take comments to assign issues to users #1058

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

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

timsaucer
Copy link
Contributor

Which issue does this PR close?

None

Rationale for this change

Copied from the datafusion repo to allow users to comment "take" and have an issue assigned to them.

What changes are included in this PR?

Add github workflow

Are there any user-facing changes?

None

Copy link
Contributor
@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

LGTM

steps:
- run: |
CODE=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -LI https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees/${{ github.event.comment.user.login }} -o /dev/null -w '%{http_code}\n' -s)
if [ "$CODE" -eq "204" ]
Copy link
Contributor

Choose a reason for hiding this comment

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

204 is doing all the heavy lifting here

Checks if a user has permission to be assigned to a specific issue.

If the assignee can be assigned to this issue, a 204 status code with no content is returned.

https://docs.github.com/en/rest/issues/assignees?apiVersion=2022-11-28#check-if-a-user-can-be-assigned-to-a-issue

@timsaucer timsaucer merged commit 0002372 into apache:main Mar 10, 2025
15 checks passed
@timsaucer timsaucer deleted the minor/add-take-workflow branch March 10, 2025 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0