-
Notifications
You must be signed in to change notification settings - Fork 848
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
Improved bug board automatization #6071
Conversation
40a582f
to
c13462b
Compare
gh api graphql --paginate -F issue=$ISSUE -F project=$PROJECT -F owner=$OWNER -F repo=$REPO -f query=' | ||
query board_column($issue: Int!, $project: Int!, $owner: String!, $repo: String!, $endCursor: String) { | ||
repository(owner: $owner, name: $repo) { |
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.
Maybe the search endpoint can help for filtering? I used something like this in my script to find the PRs:
query {
search(
first: 100,
$end_cursor
query: "$search_query_base repo:$repo merged:$date_begin..$date_end -author:app/github-actions"
type:ISSUE
) {
pageInfo { endCursor }
nodes {
... on PullRequest {
number
.....
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.
@akuzm I agree. Most GraphQL endpoints allow filtering (e.g., you can search for issues, repositories, PRs..) and this is how GraphQL should work. You could use the search endpoint to find the project, but then you don't have the ability to select a particular issue in this project.
I tried a lot of things and read a lot of discussions around it. It seems the ProjectV2 part of the GraphQL-API cannot do server-side filtering of issues at the moment. Furthermore, there is no REST-API available for the ProjectV2 section that could be used as an alternative.
- name: Get board column of issue | ||
id: extract_board_column | ||
continue-on-error: true | ||
run: | |
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.
This looks like something that might be useful to turn into a github action, preferably put in https://github.com/timescale/build-actions. This would allow it to be used from both this repository and the timescale-tune repository.
Codecov Report
@@ Coverage Diff @@
## main #6071 +/- ##
==========================================
+ Coverage 81.38% 81.52% +0.13%
==========================================
Files 243 246 +3
Lines 55948 56531 +583
Branches 12389 12516 +127
==========================================
+ Hits 45536 46088 +552
+ Misses 8092 8078 -14
- Partials 2320 2365 +45 see 38 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
.github/workflows/procedural.yaml
Outdated
board_column=$(cat api_result | jq -r ".data.repository.issue.projectV2.items.nodes[] | | ||
select (.content.number == $ISSUE and .content.repository.name == \"$REPO\" and .content.repository.owner.login == \"$OWNER\") | | ||
.fieldValueByName.name") |
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.
jq
takes the file as the last argument, so probably cat
is unnecessary here.
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.
Thanks, changed
c13462b
to
2d18453
Compare
In our bug board, issues were moved into the 'Waiting for Engineering' column when the author of an issue responded. The column move was made if the issue was tagged with the label 'waiting-for-author'. However, sometimes this label was not added to the waiting issues. As a result, the issue was not moved to the right column when the author responded. This PR replaces the error-prone label check with a check in which column the issue is.
2d18453
to
07697c6
Compare
In our bug board, issues were moved into the 'Waiting for Engineering' column when the author of an issue responded. The column move was made if the issue was tagged with the label 'waiting-for-author'. However, sometimes this label was not added to the waiting issues. As a result, the issue was not moved to the right column when the author responded.
This PR replaces the error-prone label check with a check in which column the issue is.
The workflow was tested in the timescaledb-tune repository with the issue timescale/timescaledb-tune#126
Disable-check: force-changelog-file