Title: [281956] trunk/Tools
- Revision
- 281956
- Author
- [email protected]
- Date
- 2021-09-02 14:59:56 -0700 (Thu, 02 Sep 2021)
Log Message
[contributors.json] Relocation (Part 6)
https://bugs.webkit.org/show_bug.cgi?id=229690
<rdar://problem/82552403>
Reviewed by Yusuke Suzuki.
* WebKitBot/src/Commit.mjs: Use name instead of fullName.
* WebKitBot/src/Contributors.mjs: Load contributors from metadata/contributors.json,
parse as list instead of dictionary.
* WebKitBot/tests/Commit.test.mjs: Load contributors from metadata/contributors.json.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (281955 => 281956)
--- trunk/Tools/ChangeLog 2021-09-02 21:49:25 UTC (rev 281955)
+++ trunk/Tools/ChangeLog 2021-09-02 21:59:56 UTC (rev 281956)
@@ -1,5 +1,18 @@
2021-09-02 Jonathan Bedard <[email protected]>
+ [contributors.json] Relocation (Part 6)
+ https://bugs.webkit.org/show_bug.cgi?id=229690
+ <rdar://problem/82552403>
+
+ Reviewed by Yusuke Suzuki.
+
+ * WebKitBot/src/Commit.mjs: Use name instead of fullName.
+ * WebKitBot/src/Contributors.mjs: Load contributors from metadata/contributors.json,
+ parse as list instead of dictionary.
+ * WebKitBot/tests/Commit.test.mjs: Load contributors from metadata/contributors.json.
+
+2021-09-02 Jonathan Bedard <[email protected]>
+
[webkit-patch] apply-watchlist command fails on python 3
https://bugs.webkit.org/show_bug.cgi?id=229822
<rdar://problem/82691261>
Modified: trunk/Tools/WebKitBot/src/Commit.mjs (281955 => 281956)
--- trunk/Tools/WebKitBot/src/Commit.mjs 2021-09-02 21:49:25 UTC (rev 281955)
+++ trunk/Tools/WebKitBot/src/Commit.mjs 2021-09-02 21:59:56 UTC (rev 281956)
@@ -42,9 +42,9 @@
if (!entry.nicks)
continue;
- let nameWithNicks = `${entry.fullName} (@${entry.nicks[0]})`;
- if (change.includes(entry.fullName)) {
- change = replaceAll(entry.fullName, nameWithNicks, change);
+ let nameWithNicks = `${entry.name} (@${entry.nicks[0]})`;
+ if (change.includes(entry.name)) {
+ change = replaceAll(entry.name, nameWithNicks, change);
for (let email of entry.emails)
change = replaceAll(`<${email}>`, "", change);
} else {
@@ -79,7 +79,7 @@
if (this._email) {
let entry = contributors.queryWithEmail(this._email);
if (entry && entry.nicks && entry.nicks[0])
- this._author = `${entry.fullName} (@${entry.nicks[0]})`;
+ this._author = `${entry.name} (@${entry.nicks[0]})`;
}
}
if (this._revert) {
Modified: trunk/Tools/WebKitBot/src/Contributors.mjs (281955 => 281956)
--- trunk/Tools/WebKitBot/src/Contributors.mjs 2021-09-02 21:49:25 UTC (rev 281955)
+++ trunk/Tools/WebKitBot/src/Contributors.mjs 2021-09-02 21:59:56 UTC (rev 281956)
@@ -25,7 +25,7 @@
import axios from "axios";
-const contributorsURL = "https://svn.webkit.org/repository/webkit/trunk/Tools/Scripts/webkitpy/common/config/contributors.json";
+const contributorsURL = "https://svn.webkit.org/repository/webkit/trunk/metadata/contributors.json";
export default class Contributors {
static async create()
@@ -38,8 +38,7 @@
{
this.emails = new Map;
this.entries = [];
- for (let [fullName, entry] of Object.entries(data)) {
- entry.fullName = fullName;
+ for (let entry of data) {
this.entries.push(entry);
for (let email of entry.emails)
this.emails.set(email, entry);
Modified: trunk/Tools/WebKitBot/tests/Commit.test.mjs (281955 => 281956)
--- trunk/Tools/WebKitBot/tests/Commit.test.mjs 2021-09-02 21:49:25 UTC (rev 281955)
+++ trunk/Tools/WebKitBot/tests/Commit.test.mjs 2021-09-02 21:59:56 UTC (rev 281956)
@@ -30,7 +30,7 @@
import Contributors from "../src/Contributors.mjs";
import {rootDirectoryOfWebKit} from "../src/Utility.mjs";
-const localContributorsPath = path.resolve(rootDirectoryOfWebKit(), "Tools", "Scripts", "webkitpy", "common", "config", "contributors.json");
+const localContributorsPath = path.resolve(rootDirectoryOfWebKit(), "metadata", "contributors.json");
const contributors = new Contributors(JSON.parse(readFileSync(localContributorsPath)));
const readFileAsync = util.promisify(readFile);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes