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

Adjusted label-matching to be case insensitive #29

Merged
merged 3 commits into from
Jun 2, 2020
Merged

Adjusted label-matching to be case insensitive #29

merged 3 commits into from
Jun 2, 2020

Conversation

xinyuluo
Copy link
Collaborator

@xinyuluo xinyuluo commented Jun 2, 2020

Description of the task

Adjusted label-matching to be case insensitive.

How to test

In mock_payloads, one can find a newly added .json files called pull_request.closed_capitalized.json.

To test that label-matching is now case-insensitive, run the following commands:

./notabot check --json path/to/file

The expected output should be:

Using push routing:  
  backend/api* -> #aa
  backend/megaindex* or backend/ahrefskit* -> #backend
  any -> #all-push-events
Using pull request routing:
  backend* -> #backend
  aa* -> #aa-git
  siren* -> #siren
  not backend* or aa* or siren* -> #frontend-bot

As the label matching is now case-insensitive and the PR in this test has label "AA", one should expect the notabot to send notifications to #aa-git. If label matching is still case-sensitive, notabot will send notifications to #frontend-bot.

@Khady
Copy link
Contributor

Khady commented Jun 2, 2020

@xinyuluo I have added a test setup in #27. So now all the json files in the mock_payloads dir are tested and the output of notabot is captured. When you add a new payload, you must run make test_promote to capture the new output. You then check that the diff is expected. And eventually commit it.

@xinyuluo xinyuluo merged commit 2fcdad5 into master Jun 2, 2020
@xinyuluo xinyuluo deleted the label branch June 2, 2020 04:46
yasunariw pushed a commit that referenced this pull request Nov 30, 2021
Adjusted label-matching to be case insensitive
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