Skip to content

Commit

Permalink
gadgets-sync: fix {{sudo}} param name
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Jun 1, 2024
1 parent e0feed7 commit b9ed4e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gadgets-sync/gadgets-sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function getConfig() {

if (remote.data !== local.data.replace(substitutedHeader, '')) {
const pg = await bot.read(talkTitle)
if (!pg.missing && pg.revisions[0].content.includes(`{{sudo|page=${conf.page}|answered=no}}`)) {
if (!pg.missing && pg.revisions[0].content.includes(`{{sudo|1=${conf.page}|answered=no}}`)) {
log(`[+] Open edit request already exists on ${conf.talkPage}, skipping`)
continue
}
Expand All @@ -73,7 +73,7 @@ async function getConfig() {
const date = new bot.Date().format('D MMMM YYYY')
const isMatchingTalk = new bot.Page(conf.page).toText() === new bot.Title(conf.talkPage).getSubjectPage().toText()
await bot.newSection(conf.talkPage, `Sync request ${date}` + (isMatchingTalk ? '' : ` for ${conf.page}`),
`{{sudo|page=${conf.page}|answered=no}}\nPlease sync [[${conf.page}]] with [[${syncPage}]] ([${comparePagesLink} diff]). This brings it in sync with the upstream changes at [[${conf.source}]] ([[Special:PageHistory/${conf.source}|hist]]).\n\nThis edit request is raised automatically based on the configuration at [[${CONFIG_PAGE}]]. Thanks, ~~~~`)
`{{sudo|1=${conf.page}|answered=no}}\nPlease sync [[${conf.page}]] with [[${syncPage}]] ([${comparePagesLink} diff]). This brings it in sync with the upstream changes at [[${conf.source}]] ([[Special:PageHistory/${conf.source}|hist]]).\n\nThis edit request is raised automatically based on the configuration at [[${CONFIG_PAGE}]]. Thanks, ~~~~`)
log(`[S] Created edit request on [[${conf.talkPage}]]`)
}
}
Expand Down

0 comments on commit b9ed4e3

Please sign in to comment.