Opened 4 years ago

Last modified 3 years ago

#4061 new change

Configure the hg hook that closes the issues fixed by pushed commits and sets milestones

Reported by: kvas Assignee:
Priority: Unknown Milestone:
Module: Infrastructure Keywords:
Cc: matze, fhd, kzar Blocked By: #3681
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)

Background

#3681 adjusted the hook introduced by #3674 and deployed by #3676 and added a new hook that closes the issues fixed by pushed commits and sets milestones. In order for the changes to take effect we need to configure milestone regexps and set the function that tracks the movement of master bookmark as prepushkey hook for the hg repositories.

What to change

Add hg_module_milestones section to sitescripts.ini and populate it with regular expressions for module milestones:

[hg_module_milestones]
Adblock-Browser-for-Android=adblock-browser-for-android-((beta-)?[\d\.]+|next)
Adblock-Browser-for-iOS=adblock-browser-for-ios-((beta-)?[\d\.]+|next)
Adblock-Plus-for-Firefox=adblock-plus(-[\d\.]+)?-for-firefox(-next)?
Adblock-Plus-for-Internet-Explorer=adblock-plus(-[\d\.]+)?-for-internet-explorer(-next)?
Adblock-Browser-for-Samsung-Browser=adblock-plus-for-samsung-browser-((beta-)?[\d\.]+|next)
Adblock-Plus-for-iOS=adblock-plus-for-ios-((beta-)?[\d\.]+|next)
URL-Fixer=url-fixer-([\d\.]+|next)

Set pushkey_hook function from sitescripts/hg/bin/update_issues.py as prepushkey hook on hg repositories and change pretxnchangegroup hook to be changegroup_hook function in the same file:

[hooks]
pretxnchangegroup = python:<path-to-sitescripts>/sitescripts/hg/bin/update_issues.py:changegroup_hook
prepushkey = python:<path-to-sitescripts>/sitescripts/hg/bin/update_issues.py:pushkey_hook

See #3676, that covered the deployment of the original hook, for reference.

Change History (1)

comment:1 Changed 3 years ago by kzar

  • Description modified (diff)

OK I went through all the Trac Modules and found examples of their corresponding Milestones where possible:

"Adblock-Browser-for-Android", "Adblock-Browser-for-Android-next", ["Adblock-Browser-for-Android-1.1.0", "Adblock-Browser-for-Android-beta-1.0.0.2015052021"]
"Adblock-Browser-for-iOS", "Adblock-Browser-for-iOS-next", "Adblock-Browser-for-iOS-1.1.0"
"Adblock-Plus-for-Firefox", "Adblock-Plus-2.8.2-for-Firefox", "Adblock-Plus-2.8.2-for-Firefox"
"Adblock-Plus-for-Internet-Explorer", "Adblock-Plus-for-Internet-Explorer-Next", "Adblock-Plus-1.2-for-Internet-Explorer"
"Adblock-Plus-for-Samsung-Browser", "Adblock-Plus-for-Samsung-Browser-next", "Adblock-Plus-for-Samsung-Browser-1.0.1"
"Adblock-Plus-for-iOS", "Adblock-Plus-for-iOS-next", "Adblock-Plus-for-iOS-1.0.0"
"URL-Fixer", "URL-Fixer-next", "URL-Fixer-4.1.1"

Some modules were not suitable:

  1. Platform now has different Milestones depending on branch (bookmark).
  2. Extensions-for-Adblock-Plus contains multiple different projects and therefore Milestones.
  3. Quite a few modules just don't use milestones.

From there I came up with suitable regular expressions and I've updated the description. I think this is ready for deployment now.

Note: See TracTickets for help on using tickets.