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

apply label "synced" for issues that were syncronysed #51

Closed
beliaev-maksim opened this issue Dec 6, 2024 · 6 comments · Fixed by #59
Closed

apply label "synced" for issues that were syncronysed #51

beliaev-maksim opened this issue Dec 6, 2024 · 6 comments · Fixed by #59
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@beliaev-maksim
Copy link
Member

beliaev-maksim commented Dec 6, 2024

Some teams do not want to have the comment on the tickets, since that leads to an internal ticket. We can offer a different functionality and apply "synced" label.

To reduce API load, it must be a prerequisite for user to have this Label created before. We can write a comment on the ticket if Label was requested but not added to the list

@beliaev-maksim beliaev-maksim added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 6, 2024
@lorenzo-medici
Copy link
Contributor

Hi, I would like to take a shot at this.

@beliaev-maksim
Copy link
Member Author

@lorenzo-medici please go

I think this also should be a configuration option for this

@lorenzo-medici
Copy link
Contributor

lorenzo-medici commented Dec 16, 2024

Since the configuration is only applied through environment variables, it is currently impossible to change it for each test case.
I opened PR #58 to allow each test function to declare custom configuration of the environment variables, with cleanup at the end to let following tests proceed with the default test configuration found in dumm_env.
Please review it and give all the feedback you find necessary.
(Edit: the PR is back in draft as I noticed a mistake)

I also have a question about the feature: how does it interact with add_gh_comment if this is set? I think the most logical option is that we will both write the normal comment and add the Synced label.

@beliaev-maksim
Copy link
Member Author

@lorenzo-medici that is not correct.
you are talking about the defaults DEFAULT_BOT_CONFIG
however, the actual config comes from GitHub repo. For this, you need to tweak payloads:

url: https://api.github.com:443/repos/beliaev-maksim/test-ci/contents/.github/.jira_sync_config.yaml

though, for your test we might need two separate payloads for two different cases

@lorenzo-medici
Copy link
Contributor

lorenzo-medici commented Dec 16, 2024

Oh I see, I completely misunderstood the settings stuff. I will close the PR.

So for testing I should add files under url_responses that return the config with the new fields, and an endpoint to check for an existing label, and then load it in the new test cases. As you said, it should be two files with one returning the label as existing, and the other one without it to check for all situations.

@beliaev-maksim
Copy link
Member Author

so, we need one response which is default (for validation of back compatibility)
and one where we return .jira_sync_config.yaml content with the new setting, like add_gh_synced_label: true or so

then you branch the logic in the main code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants