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

Improved bug board automatization #6071

Merged
merged 1 commit into from
Sep 14, 2023

Conversation

jnidzwetzki
Copy link
Contributor

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

Comment on lines +53 to +61
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) {
Copy link
Member

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
                        .....

Copy link
Contributor Author

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.

Comment on lines +48 to +51
- name: Get board column of issue
id: extract_board_column
continue-on-error: true
run: |
Copy link
Contributor

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
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Merging #6071 (07697c6) into main (93519d0) will increase coverage by 0.13%.
Report is 4 commits behind head on main.
The diff coverage is n/a.

@@            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

Comment on lines 90 to 98
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")
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, changed

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.
@jnidzwetzki jnidzwetzki enabled auto-merge (rebase) September 14, 2023 11:05
@jnidzwetzki jnidzwetzki merged commit 7fbaf2a into timescale:main Sep 14, 2023
35 checks passed
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.

None yet

3 participants